Remove-SCSMSubscription

Removes a subscription from Service Manager.

Syntax

Remove-SCSMSubscription
      [-Subscription] <Subscription[]>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-SCSMSubscription cmdlet removes a subscription from Service Manager.

Examples

Example 1: Delete subscriptions by using the display name

PS C:\>Get-SCSMSubscription -DisplayName "custom*" | Remove-SCSMSubscription

This command gets subscriptions that have display names that contain the string custom by using the Get-SCSMSubscription cmdlet. The command passes these subscriptions to the current cmdlet by using the pipeline operator. That cmdlet deletes each subscription.

Required Parameters

-Subscription

Specifies the object that represents the subscription that this cmldet removes.

Type:Subscription[]
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.Subscriptions.Subscription

You can pipe a subscription to the Subscription parameter.

Outputs

None.

This cmdlet does not generate any output.