SCOM 2012 cmdlet: Export-SCOMEffectiveMonitoringConfiguration

I had a few minutes this weekend and finally got to mess around with this cmdlet. I had been meaning too for a long time. The help example has a problem with the second line of the example. Feel free to use the example below. This cmdlet is a nice start to figuring out what is being monitored on a OpsMgr agent but still leaves much to be desired, like what thresholds are there etc.

First thing to do before using this cmdlet is to assign a Variable like what is done with $Members below to a group of computers that we fetch the GetRelatedMonitoringObjects. Once that is done take the $Members variable and pipe it to a for each loop that then sends the objects to the cmdlet Export-SCOMEffectiveMonitoringConfiguration which then outputs the configuration information into cvs files, whose names are variables from the display name of the objects were getting the configuration information for. Both lines below should be one line wrapped in the OpsMgr cmdShell.

$members = (Get-SCOMGroup -DisplayName “All Windows Computers”).GetRelatedMonitoringObjects()


$members | foreach { Export-SCOMEffectiveMonitoringConfiguration -Instance $_ -Path “D:\temp2\$($_.DisplayName).
csv” -RecurseContainedObjects }



One thought on “SCOM 2012 cmdlet: Export-SCOMEffectiveMonitoringConfiguration

  1. Craig Pero

    I found an interesting issue on my clients pre-production system.  I would run the command below

    $TargetComputter is the MonitoringClassInstance

    Export-SCOMEffectiveMonitoringConfiguration -Instance $TargetComputer -Path (“c:\temp\cTempComputer.csv”) -RecurseContainedObjects -ErrorAction Continue

    PS Microsoft.EnterpriseManagement.OperationsManager.client\OperationsManagerMonitoring::> Export-SCOMEffectiveMonitoringConfiguration -Instance $members -Path (“c:\temp\cTempComputer.csv”) -RecurseContainedObjects -ErrorAction Continue
    Export-SCOMEffectiveMonitoringConfiguration : An object of class ManagementPackRule with ID b379ac7d-3d9d-f768-8226-7f3aa070a565 was not found.
    At line:1 char:1
    + Export-SCOMEffectiveMonitoringConfiguration -Instance $members -Path (“c:\temp\c …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Microsoft.Syste…igurationCmdlet:ExportSCEffecti…igurationCmdlet) [Export-SCOMEffe…ngConfiguration], ObjectNotFoundException
    + FullyQualifiedErrorId : ExecutionError,Microsoft.SystemCenter.OperationsManagerV10.Commands.ExportSCEffectiveMonitoringConfigurationCmdlet

    Searching for the rule with that ID via powershell failed to return any results BUT a query of the RuleView table did find it.  It turns out that an exported management pack from 2007 production has some subscriptions for a connector that does not exists in Pre-Production 2012 (note, this is in the Microsoft.SystemCenter.Notifications.Internal Management Pack.  You must export the management pack, edit the XML to remove the <rule></rule> and <displayname></displayname> tags for the rule and then import back in.  Repeat the process until the error stops.

    The Export-ScomEffectiveMonitoringConfiguration CmdLet does not skip bad records.  A subscription criteria is apparently stored as a rule and subscriptions run on the RMS and thus why it is the only place we ran into this issue.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.