Getting SCOM alerts specific to a computer
This code demonstrates how to get the alert list specific to a computer. We can change the value of $ComputerName
to list alerts from specific computer.
The following example lists the alerts generated from the Test Computer
machine:
$ComputerName = "TestComputer" $AllAlerts = Get-SCOMAlert $MyAlerts = $AllAlerts -criteria "NetbiosComputerName = '$ComputerName'" | export-csv c:\alert.csv