Remove-CMDeployment

Removes a deployment.

Syntax

Remove-CMDeployment
      -DeploymentId <String>
      [-Force]
      -ApplicationName <String>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMDeployment
      -CollectionName <String>
      [-Force]
      -ApplicationName <String>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMDeployment
      [-Force]
      -InputObject <IResultObject>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-CMDeployment cmdlet removes an application deployment from Microsoft System Center Configuration Manager.

When you remove an application deployment, Configuration Manager does not remove instances of the application that it has already installed. To remove these applications, you must deploy the application to computers with the action Uninstall. If you delete an application deployment, or remove a resource from the collection you are deploying to, the application will no longer be visible in Software Center or the Application Catalog.

Examples

Example 1: Remove an application deployment

PS C:\> Remove-CMDeployment -ApplicationName "CMappD01" -CollectionName "All Users"

This command removes the Configuration Manager deployment that is associated with the application named CMappD01 and that is applied to the collection named All Users.

Example 2: Pass a deployment object and remove it

PS C:\> Get-CMDeployment -CollectionName "deviceCol01" -FeatureType Application | Remove-CMDeployment -Force

This command gets the specified application deployment object for the collection named deiceCol01 and uses the pipeline operator to pass the object to Remove-CMDeployment, which removes the deployment. Because the Force parameter is specified, the user is not prompted before the deployment is removed.

Example 3: Remove a deployment by its ID

PS C:\> Remove-CMDeployment -DeploymentId "{890082B6-7C16-4600-8807-7E0003BC9D99}" -ApplicationName "application01" -Force

This command removes the deployment named application01 with the specified ID. Because the Force parameter is specified, the user is not prompted before the deployment is removed.

Required Parameters

-ApplicationName

Specifies the name of the application associated with the deployment.

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

Specifies the name of the collection associated with the deployment.

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

Specifies the ID of a deployment.

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

Specifies a deployment object. To obtain a deployment object, use the Get-CMDeployment cmdlet.

Type:IResultObject
Aliases:Deployment
Position:Named
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
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

Performs the action without a confirmation message.

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

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
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