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.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Subscription

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

Type:Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.Subscriptions.Subscription[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required: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.