New-CMAlertSubscription

New-CMAlertSubscription

Creates an alert subscription object.

Syntax

Parameter Set: New
New-CMAlertSubscription -EmailAddress <String[]> -Name <String> [-AlertId <Int32[]> ] [-LocaleId <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-CMAlertSubscription cmdlet creates a subscription that sends alert notifications to one or more users when specific events occur in Microsoft System Center 2012 SP1 Configuration Manager. Before you create an alert subscription, make sure that you have configured email settings for sending alert notifications, and that you have at least one alert configured in System Center 2012 Configuration Manager.

Parameters

-AlertId<Int32[]>

Specifies an array of alert IDs for the subscription.

Aliases

AlertIds

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EmailAddress<String[]>

Specifies an email address where you want to send an alert notification. You can separate multiple email addresses by using a semicolon.

Aliases

EmailAddresses

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LocaleId<Int32>

Specifies a locale for alert messages. For more information and a list of locale identifiers, see the Locale IDs Assigned by Microsoft topic at https://go.microsoft.com/fwlink/?LinkId=262651.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of an alert subscription object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Create an alert subscription

This command creates an alert subscription named Subscription01. If there is an event that pertains to the specified alert, this subscription sends alert notifications to an email recipient. Because the command specifies a locale ID of 1033, the subscription uses US English.

PS C:\> New-CMAlertSubscription -Name "Subscription01" -EmailAddress "evan.narvaez@contoso.com" -LocaleId 1033 -AlertIds 16777219

Get-CMAlertSubscription

Set-CMAlertSubscription

Remove-CMAlertSubscription