Remove-CMSoftwareUpdateDeployment

Removes a software update deployment.

Syntax

Remove-CMSoftwareUpdateDeployment
      -InputObject <IResultObject>
      [-Force]
      [-Collection <IResultObject>]
      [-CollectionId <String>]
      [-CollectionName <String>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMSoftwareUpdateDeployment
      [-DeploymentId <String>]
      [-Force]
      [-Collection <IResultObject>]
      [-CollectionId <String>]
      [-CollectionName <String>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMSoftwareUpdateDeployment
      [-Name <String>]
      [-Force]
      [-Collection <IResultObject>]
      [-CollectionId <String>]
      [-CollectionName <String>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMSoftwareUpdateDeployment
      [-SmsObjectId <Int32>]
      [-Force]
      [-Collection <IResultObject>]
      [-CollectionId <String>]
      [-CollectionName <String>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Remove a deployment by its DeploymentId

This example removes the specified software update deployment by its DeploymentId. Specifying the Force parameter removes the deployment without prompting the user.

Remove-CMSoftwareUpdateDeployment -DeploymentId "{7F4267D4-33AD-4Y56-A7FF-FA31B2BA8571}" -Force

Example 2: Remove all software deployments associated to a collection

This example gets all software update deployments associated to a collection by its CollectionId. It then uses the pipeline operator to pass them to Remove-CMSoftwareUpdateDeployment, which removes them.

Get-CMSoftwareUpdateDeployment -CollectionId "P01003AE" | Remove-CMSoftwareUpdateDeployment

Parameters

-Collection

Type:IResultObject
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CollectionId

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CollectionName

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeploymentId

Type:String
Aliases:AssignmentUniqueID, SoftwareUpdateDeploymentID
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Run the command without asking for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Type:IResultObject
Aliases:Assignment, SoftwareUpdateDeployment, SoftwareUpdate
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Type:String
Aliases:SoftwareUpdateName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

-SmsObjectId

Type:Int32
Aliases:CI_ID, SoftwareUpdateID
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object