Listing all management server open alerts
One of the common requirements for the daily SCOM health check report is to list the alerts related to management servers. The following PowerShell code lists all the management server open alerts:
$ManagementServers = Get-SCOMManagementServer $AlertDetails = @() foreach ($ManagementServer in $ManagementServers) { $AlertDetails += get-SCOMAlert -Criteria ("NetbiosComputerName = '" + $ManagementServer.ComputerName + "'") | where {$_.ResolutionState -ne '255' -and $_.MonitoringObjectFullName -Match 'Microsoft.SystemCenter'} | select TimeRaised,Name,Description,Severity } $AlertDetails