Export SCOM 2010 alerts to TXT/CSV file using PowerShell

You can use PowerShell to export alerts from SCOM 2010 to a CSV file with lots of information included. Please note, exported alerts are listed in Greenwich Mean Time (GMT) time zone.

#Closed Critical Alerts

get-scomalert -criteria ‘ResolutionState=255 AND Severity>=2’ | select MonitoringObjectDisplayName,Name,Severity,ResolutionState,TimeRaised,TimeResolved,Parameters | export-csv c:\ClosedCriticalAlerts.txt

#New Critical Alerts

get-scomalert -criteria ‘ResolutionState=0 AND Severity>=2’ | select MonitoringObjectDisplayName,Name,Severity,ResolutionState,TimeRaised,Parameters | export-csv c:\NewCriticalAlerts.txt

#New Warning Alerts

get-scomalert -criteria ‘ResolutionState=0 AND Severity>=2’ | select MonitoringObjectDisplayName,Name,Severity,ResolutionState,TimeRaised,Parameters | export-csv c:\NewWarningAlerts.txt

Resolution State

0 = New
255 = Closed

Severity Values for Alerts

0 = INFORMATIONAL
1 = WARNING
2 = CRITICAL

Computers and Internet Uncategorized

2 Comments Leave a comment

  1. Thanks for the good post, I had to adapt a little for scom2012 to get it worked but it gave me the basic information I needed to export the alerts from scom. Scom2012 use: “-resolutionstate 0” and “-resolutionstate 255”.

Leave a Reply

Please log in using one of these methods to post your comment:

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

%d bloggers like this: