Share via


Remove-SCSMSubscription

Removes a subscription from Service Manager.

Syntax

Default (Default)

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.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Subscription

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

Parameter properties

Type:

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

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

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.