Share via


Get-SCOMAlertHistory

Gets history entries for alerts.

Syntax

Default (Default)

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.

Parameter properties

Type:

MonitoringAlert[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.