Remove-CMAlertSubscription
Updated: March 1, 2013
Applies To: System Center 2012 Configuration Manager SP1
Remove-CMAlertSubscription
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
Removes an alert subscription from Configuration Manager without prompting you for confirmation.
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 an array of names of alert subscription objects.
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 example removes an alert subscription by using its ID.
PS C:\> Remove-CMAlertSubscription -Id "16777310"
Example 2: Remove an alert subscription by name
This example 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
In this example, 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:\> $SubSbj = Get-CMAlertSubscription -Id "16777310"PS C:\> Remove-CMAlertSubscription -AlertSubscription $SubObj
