Remove-CMPackageDeployment

Removes a package deployment from Configuration Manager.

Syntax

Remove-CMPackageDeployment
      -InputObject <IResultObject>
      [-ProgramName <String>]
      [-Force]
      [-Collection <IResultObject>]
      [-CollectionId <String>]
      [-CollectionName <String>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMPackageDeployment
      [-DeploymentId <String>]
      [-ProgramName <String>]
      [-Force]
      [-Collection <IResultObject>]
      [-CollectionId <String>]
      [-CollectionName <String>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMPackageDeployment
      [-Name <String>]
      [-ProgramName <String>]
      [-Force]
      [-Collection <IResultObject>]
      [-CollectionId <String>]
      [-CollectionName <String>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMPackageDeployment
      [-PackageId <String>]
      [-ProgramName <String>]
      [-Force]
      [-Collection <IResultObject>]
      [-CollectionId <String>]
      [-CollectionName <String>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-CMPackageDeployment cmdlet remove a package deployment from Configuration Manager. A deployment includes a collection of devices or users, a package to deploy, and either a device program name or a standard program name. To specify which deployment to modify, specify the collection name, package, and program name. You can specify the package by name or ID, or you can use the Get-CMPackage cmdlet to get a package object.

Note

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

Examples

Example 1

PS XYZ:\>

Parameters

-Collection

Specifies the user collection.

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

-CollectionId

Specifies the ID of a device or user collection.

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

-CollectionName

Specifies the name of a user collection.

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

Specifies the ID of a package deployment.

Type:String
Aliases:AdvertisementID, PackageDeploymentID
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

Forces the command to run without asking for user 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

Specifies a package deployment object.

Type:IResultObject
Aliases:Advertisement, PackageDeployment, Package
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of a package deployment.

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

-PackageId

Specifies the ID of a package.

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

-ProgramName

Specifies the name of a program.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not 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