Get-CMAlertSubscription

Get one or more alert subscription objects.

Syntax

Get-CMAlertSubscription
   [-Fast]
   [-Name <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMAlertSubscription
   [-Fast]
   -Id <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

Use this cmdlet to get one or more Configuration Manager alert subscriptions and display their properties. Use subscriptions to send an email for an alert. For more information, see Configure email alerts.

Note

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

Examples

Example 1: Display all alert subscriptions

This command displays all Configuration Manager alert subscriptions.

Get-CMAlertSubscription

Example 2: Display alert subscriptions by ID by using wildcard characters

This command displays all Configuration Manager alert subscriptions that have an ID that starts with the number 16777.

Get-CMAlertSubscription -Id 16777*

Example 3: Display an alert subscription by name

This command displays the Configuration Manager alert subscription named Subscription01.

Get-CMAlertSubscription -Name "Subscription01"

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 the ID of a subscription. For example, 11.

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

-Name

Specify the name of an alert subscription.

You can use wildcard characters:

  • *: Multiple characters
  • ?: Single character
Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

Inputs

None

Outputs

IResultObject[]

IResultObject

Notes

For more information on this return object and its properties, see SMS_Subscription server WMI class.