Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Remove-AzResourceGroupDeployment

Removes a resource group deployment and any associated operations.

Syntax

RemoveByResourceGroupName (Default)

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

RemoveByResourceGroupDeploymentId

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.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-Id

Specifies the ID of the resource group deployment to remove.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DeploymentId, ResourceId

Parameter sets

-Name

Specifies the name of the resource group deployment to remove.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DeploymentName

Parameter sets

-Pre

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

Specifies the name of the resource group to remove.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

Boolean

Related Links


Feedback

Was this page helpful?