Disabling all the Rules\Monitors of a Management Pack in SCOM 2012

This PS script can be used to disable all the Rules\Monitors of a Management pack to its target class.

1st Inputs – Enter the display name of the management pack you wish to disable all the rules and monitors. Example : Windows Server 2012 Operating System (Monitoring).

2nd Input – Enter the Override Management Pack display name. You need to create the override Management Pack before. Example : Windows Server 2012 Monitoring Override MP

Note: Enter without any quotes in the PS

PS Script:

——————————————————————————————————————-
$MPNAME = Read-Host ‘Enter the Managemant Pack Display Name’
$OVerrideMPName = Read-Host ‘Enter the Unsealed Override MP Name’
$MPSealed = Get-SCOMManagementPack -DisplayName $MPNAME
$MPUnsealed = Get-SCOMManagementPack -DisplayName $OVerrideMPName
$MPRule = get-SCOMRule -ManagementPack $MPSealed
$MPMonitor = Get-SCOMMonitor -ManagementPack $MPSealed
Disable-SCOMRule -Rule $MPRule -ManagementPack $MPUnsealed
Disable-SCOMMonitor -Monitor $MPMonitor -ManagementPack $MPUnsealed

—————————————————————————————————————–

Save the above script as filename.PS1 and execute on the Management server.

Hope this helps you.
Regards

Ranjith A

 

 

 

One thought on “Disabling all the Rules\Monitors of a Management Pack in SCOM 2012

Leave a Reply

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