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

2 Comments

  1. Good post. I learn something totally new and challenging on blogs I stumbleupon on a
    daily basis. It will always be exciting to read through content
    from other writers and use something from other sites.

  2. 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 )

Facebook photo

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

Connecting to %s