Get-CMAlert

Get Configuration Manager alerts.

Syntax

Get-CMAlert
   [-Fast]
   [[-Name] <String>]
   [-TypeId <Int32>]
   [-TypeInstanceId <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMAlert
   [-Fast]
   -Id <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

Use this cmdlet to get one or more Configuration Manager alerts. You can get a specific alert by specifying the name or ID of the alert.

Configuration Manager generates alerts from certain operations when a specific condition occurs. Typically, it generates alerts when an error occurs that you need to resolve. For more information, see Configure alerts in Configuration Manager.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Get all alerts

This command gets all alerts that Configuration Manager manages.

Get-CMAlert

Example 2: Get alerts by using name

This command gets all alerts that have a name that begins with the character $.

Get-CMAlert -Name "$*" | Select-Object Id, Name, AlertState

Parameters

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Fast

Add this parameter to not automatically refresh lazy properties. Lazy properties contain values that are relatively inefficient to retrieve. Getting these properties can cause additional network traffic and decrease cmdlet performance.

If you don't use this parameter, the cmdlet displays a warning. To disable this warning, set $CMPSSuppressFastNotUsedCheck = $true.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

Specify an alert ID. For example, 33554436.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specify an alert name. You can use wildcard characters:

  • *: Multiple characters
  • ?: Single character

Alerts whose name begins with the $ character are default, system alerts.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

-TypeId

Specify the identifier for this type of alert.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

-TypeInstanceId

Specify the user-defined identifier.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

Inputs

None

Outputs

IResultObject

IResultObject

IResultObject

Notes

For more information on these return objects and their properties, see the following articles: