Remove-AzureDeployment
Syntax
Remove-AzureDeployment
[-ServiceName] <String>
[-Slot] <String>
[-DeleteVHD]
[-Force]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
The Remove-AzureDeployment cmdlet deletes a deployment of an Azure cloud service. To delete a deployment, first suspend it.
Examples
Example 1: Remove a deployment
PS C:\> Remove-AzureDeployment -ServiceName "ContosoService"
This command removes the deployment of the Azure service named ContosoService. Because this command does not specify a slot, it removes the service from the production environment.
Example 2: Remove a deployment and virtual hard disks
PS C:\> Remove-AzureDeployment -ServiceName "ContosoService" -DeleteVHD
This command removes the deployment of the service named ContosoService from the production environment. The command also removes the underlying virtual hard disks.
Required Parameters
Specifies the name of the service for which this cmdlet deletes a deployment.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the deployment environment from which this cmdlet deletes the deployment. Valid values are: Staging and Production. The default value is Production.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Optional Parameters
Specifies that this cmdlet removes the deployment and the virtual hard disks (VHDs) from blob storage.
| Type: | SwitchParameter |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Forces the command to run without asking for user confirmation.
| Type: | SwitchParameter |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
| Type: | ActionPreference |
| Aliases: | infa |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an information variable.
| Type: | String |
| Aliases: | iv |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
| Type: | AzureSMProfile |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Outputs
ManagementOperationContext