List all computers with a particular active alert

Here is the powershell, you need to amend the management server and the alert details to meet your requirements. Save as a .ps1 file and run in an Operations Manager Shell.

Import-Module OperationsManager

New-SCOMManagementGroupConnection -Computername “SCOM MGMT SERVER”

 #Get all alerts complaining about missing credentials “System Center Management Health Service Credentials Not Found Alert Message”

$hosts = Get-SCOMAlert | Where-Object {$_.Name -eq “Workflow Initialization: Failed to start a workflow that runs a process or script” -and $_.ResolutionState -ne ‘255’} | Select PrincipalName

$hosts.GetEnumerator() | Sort-Object -Property PrincipalName -Unique

This entry was posted in Powershell for SCOM and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

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

You are commenting using your 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