Bearbeiten

Freigeben über


Remove-AzResourceGroupDeployment

Removes a resource group deployment and any associated operations.

Syntax

Remove-AzResourceGroupDeployment
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-Pre]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzResourceGroupDeployment
      -Id <String>
      [-Pre]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzResourceGroupDeployment cmdlet removes an Azure resource group deployment and any associated operations.

Examples

Example 1: Removes a resource group deployment with ResourceId

Remove-AzResourceGroupDeployment -ResourceId /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testGroup/providers/Microsoft.Resources/deployments/testDeployment1

True

This command removes a resource group deployment with the fully qualified resource Id of the deployment. Successful removal returns true.

Example 2: Removes a resource group deployment with ResourceGroupName and ResourceName

Remove-AzResourceGroupDeployment -ResourceGroupName testGroup -Name testDeployment1

True

This command removes a resource group deployment with the provided ResourceGroupName and ResourceName. Successful removal returns true.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

Specifies the ID of the resource group deployment to remove.

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

-Name

Specifies the name of the resource group deployment to remove.

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

-Pre

Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.

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

-ResourceGroupName

Specifies the name of the resource group to remove.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

Boolean