SCOM 2012 Powershell One Liners to resolve alerts

#Resolve informational alerts that are created by a rule

get-scomalert -criteria ‘ResolutionState = “0” AND Severity = “0”’ | where-object {($_.IsMonitorAlert -eq $False)}| set-scomalert -ResolutionState 255 | out-null

#Resolve information alerts that are created by a monitor

get-scomalert -criteria ‘ResolutionState = “0” AND Severity = “0”’ | where-object {($_.IsMonitorAlert -eq $True)}| set-scomalert -ResolutionState 255 | Out-Null

#Resolve-scomalerts that are created by a rule on Warning alerts

get-scomalert -criteria ‘ResolutionState = “0” AND Severity = “1”’ | where-object {($_.IsMonitorAlert -eq $False)} | set-scomalert -ResolutionState 255 | out-null

#Resolve-scomalerts that are created by a monitor on Warning alerts

get-scomalert -criteria ‘ResolutionState = “0” AND Severity = “1”’ | where-object {($_.IsMonitorAlert -eq $True)} | set-scomalert -ResolutionState 255 | out-null

#Resolve-scomalerts that are created by a rule on Critical alerts

get-scomalert -criteria ‘ResolutionState = “0” AND Severity = “2”’ | where-object {($_.IsMonitorAlert -eq $False)} | set-scomalert -ResolutionState 255 | out-null

#Resolve-scomalerts that are created by a monitor on Critical alerts

get-scomalert -criteria ‘ResolutionState = “0” AND Severity = “2”’ | where-object {($_.IsMonitorAlert -eq $True)} | set-scomalert -ResolutionState 255 | out-null

#Resolve all Alerts that are created by a rule

get-scomalert -criteria ‘ResolutionState = “0”’ | where-object {($_.IsMonitorAlert -eq $False)}| set-scomalert -ResolutionState 255 | out-null

#Resolve all Alerts that are created by a monitor

get-scomalert -criteria ‘ResolutionState = “0”’ | where-object {($_.IsMonitorAlert -eq $True)}| set-scomalert -ResolutionState 255 | out-null

 

Advertisements
This entry was posted in SCOM 2012 SP1 and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s