Export (0) Print
Expand All
Expand Minimize

Remove-CMAlertSubscription

Updated: February 7, 2014

Applies To: System Center 2012 R2 Configuration Manager

Remove-CMAlertSubscription

Removes an alert subscription object.

Syntax

Parameter Set: SearchByIdMandatory
Remove-CMAlertSubscription -Id <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByNameMandatory
Remove-CMAlertSubscription -Name <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Remove-CMAlertSubscription -InputObject <IResultObject> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Remove-CMAlertSubscription cmdlet removes an alert subscription from Microsoft System Center 2012 Configuration Manager.

Parameters

-Force

Performs the action without a confirmation message.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Id<String>

Specifies an array of identifiers of subscriptions.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies an alert notification object in Configuration Manager.


Aliases

none

Required?

true

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 executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


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.

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: Remove an alert subscription by ID

This command removes an alert subscription by using its ID.


PS C:\> Remove-CMAlertSubscription -Id "16777310"

Example 2: Remove an alert subscription by name

This command removes an alert subscription named Subscription01.


PS C:\> Remove-CMAlertSubscription -Name "Subscription01"

Example 3: Remove an alert subscription by using the output from another cmdlet as input

The first command gets an alert subscription object that has the ID 16777310 and stores the object in the $SubObj variable.

The second command deletes the alert subscription that is stored in the $SubObj variable.


PS C:\> $SubObj = Get-CMAlertSubscription -Id "16777310"
PS C:\> Remove-CMAlertSubscription -AlertSubscription $SubObj

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft