Remove-MSDeploymentUnits
Remove (delete) a list of Deployment Units. Use the -UnDelete switch to Undelete instead. When a Deployment Unit is Deleted it is moved to a Delete queue to be deleted at a later date. Deleting these Deployment Units again with the -AllowRealDelete will truly delete them from MS.
Syntax
Remove-MSDeploymentUnits -DeployUnitIds (Int32[]) [-BatchSize (Int32)] [-AllowRealDelete] [-UnDelete]
Examples
## Delete a list of Deployment Units (add to delete queue)
Remove-MSDeploymentUnits -DeployUnitIds @(1000,1001,1002)
## Undelete a list of Deployment Units
Remove-MSDeploymentUnits -DeployUnitIds @(1000,1001,1002) -UnDelete
## Force a real delete of the Deployment Units. The first command adds them to the delete queue, the second forces the delete to be processed immediately.
Remove-MSDeploymentUnits -DeployUnitIds @(1000,1001,1002)
Remove-MSDeploymentUnits -DeployUnitIds @(1000,1001,1002) -AllowRealDelete