SCOM Powershell Export-SCOMEffectiveMonitoringConfiguration cmdlet Doesn't Output Complete Data

 

I was working on a support case recently when it was brought to my attention that this cmdlet does not output ALL contained instance configurations even when the
" -RecurseContainedObjects"
parameter is used. Yes, really!  It outputs configuration data for only one instance of each particular type, be it a logical disk or Ethernet adapter etc., you only get monitor and rule configuration output for one of a kind in the resulting .csv file. If you have three logical disks (i.e. C:, D:, E:) you will only see configuration data for one of those, whichever one gets enumerated first by the cmdlet. 

To overcome this limitation I've written a script that targets a group, and "recurses" all contained objects, outputs each configuration set to a separate file, then merges all of the files together to create one complete .CSV. (Thanks to Matt Hofacker for the idea) Finally, it outputs the complete dataset to Grid View (great idea StefanRoth!) for easy viewing and filtering. The merged file is available to open in Excel if needed.

Operations Manager 2012, R2 - UR2

As always, be sure to thoroughly test this in a non-production environment first and use at your own risk.

Download

 

 

 

 

12/2/2014:  Script updated. Fixed small typo in error logging output. Removed script sample text from this blog page.
8/13/2014:  Script updated.