Ying Li at myITforum.com

PowerShell & System Center

PowerShell one liner to close ~3000 SCOM alerts!

As I mentioned before, I was in Seattle for Global MVP Summit 2008 last week. So I left SCOM behind. One of my coworkers moved some DB to a different SQL box and without disabling the job associates with it – We got about ~3000 alerts for this until I disable the alert. When I try to clean up this mess. I started with the GUI way – select them in bunch and close alerts. Then I am getting tired of it and I talk to myself - why not use PowerShell? I come up with the below one liner and the alerts gone in no time!

get-alert |where {$_.netbioscomputername -eq 'xyz'} | resolve -alert

Comments

No Comments