Disabling SCOM alerts
This example demonstrates how to disable multiple rules matching a certain criteria from a particular management pack. One of the criteria selected here is to delete all the rules that match the rule name.
Here, we are trying to delete all the rules containing FileCount
in the name from the TestFile.TestMP.MP
management pack. You can change the values according to your requirements:
$MP = Get-SCOMManagementPack -Displayname "TestFile.TestMP.MP" | ` where {$_.Sealed -eq $False} $Class = Get-SCOMClass -Name "TestClass1.TestMP" $Rule = Get-SCOMRule -DisplayName "*FileCount*" Disable-SCOMRule -Class $Class -Rule $Rule -ManagementPack $MP –Enforce