Closing all Scom Alerts


posted by Krishna
11-30-2009

Downloads: 265
File size: 159 B
Views: 1,427

Embed
Closing all Scom Alerts
  1. $alerts = get-alert |where-object {$_.ResolutionState -eq 0} 
  2.  
  3. foreach($alert in $alerts
  4.    resolve-alert -comment "Resolving Alert" -Alert $alert 

Comments

tao.yang wrote re: Closing all Scom Alerts
on 11-30-2009 4:02 PM

if the purpose of this script is to close "ALL" opened alerts, the first line should be:

$alerts = get-alert |where-object {$_.ResolutionState -ne 255}  

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.