Get-SCOMAlertHistory
Gets history entries for alerts.
Syntax
Get-SCOMAlertHistory
[-Alert] <MonitoringAlert[]>
[<CommonParameters>]
Description
The Get-SCOMAlertHistory cmdlet gets history entries for one or many alerts.
Examples
Example 1: Get the history of alerts
PS C:\>Get-SCOMAlert -Name "*heartbeat*" | Get-SCOMAlertHistory | Format-Table, ResolutionState, Owner, ModifiedBy, Comments
This command gets all alerts with heartbeat in their name and passes the alerts to the Get-SCOMAlertHistory cmdlet by using the pipe operator. The Get-SCOMAlertHistory cmdlet returns the history for each alert. The Format-Table cmdlet displays the values for the ResolutionState, Owner, ModifiedBy, and Comments properties for each alert.
Parameters
-Alert
Specifies an array of MonitoringAlert objects. To obtain a MonitoringAlert object, use the Get-SCOMAlert cmdlet.
Type: | MonitoringAlert[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |