Listing all heartbeat failure machines
Heartbeat failure is one the most important alerts that should be prioritized and handled. The following code will get you the top 20 machines that are experiencing frequent heartbeat failure issues:
$HBAlerts = Get-SCOMAlert –Name "Health Service Heartbeat*" $AlertList = $HBAlerts | select Name, ` MonitoringObjectDisplayName | Group-Object -Property MonitoringObjectDisplayName `| sort-object -Property Count -descending | select -first 20 count, name