Bearbeiten

Freigeben über


Remove-AzResourceGroupDeploymentStack

Removes a Resource Group scoped Deployment Stack.

Syntax

Remove-AzResourceGroupDeploymentStack
      [-Name] <String>
      [-ResourceGroupName] <String>
      -ActionOnUnmanage <PSActionOnUnmanage>
      [-PassThru]
      [-Force]
      [-BypassStackOutOfSyncError]
      [-Pre]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzResourceGroupDeploymentStack
      -ResourceId <String>
      -ActionOnUnmanage <PSActionOnUnmanage>
      [-PassThru]
      [-Force]
      [-BypassStackOutOfSyncError]
      [-Pre]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzResourceGroupDeploymentStack
      [-InputObjet] <PSDeploymentStack>
      -ActionOnUnmanage <PSActionOnUnmanage>
      [-PassThru]
      [-Force]
      [-BypassStackOutOfSyncError]
      [-Pre]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Delete a resource group scoped deployment stack.

Examples

Example 1: Deletes the resource group deployment tsack MyRgStack from MyResourceGroup

Remove-AzResourceGroupDeploymentStack -ResourceGroupName MyResourceGroup -Name MyRGStack

Deletes a resource group scoped deployment stack named 'MyRGStack' in resource group 'MyResourceGroup,' with unmanaged resources and resource groups being detached on cleanup.

Parameters

-ActionOnUnmanage

Action to take on resources that become unmanaged on deletion or update of the deployment stack. Possible values include: 'detachAll' (do not delete any unmanaged resources), 'deleteResources' (delete all unmanaged resources that are not RGs or MGs), and 'deleteAll' (delete every unmanaged resource).

Type:PSActionOnUnmanage
Accepted values:DetachAll, DeleteResources, DeleteAll
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-BypassStackOutOfSyncError

Bypass errors for the stack being out of sync when running the operation. If the stack is out of sync and this parameter is not set, the operation will fail. Only include this parameter if instructed to do so on a failed stack operation.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-Force

Do not ask for confirmation.

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

-InputObjet

The stack PS object.

Type:PSDeploymentStack
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The name of the deploymentStack to delete

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

-PassThru

If set, a boolean will be returned with value dependent on cmdlet success.

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

-Pre

When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

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

-ResourceGroupName

The name of the Resource Group with the stack to delete

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceId

ResourceId of the stack to delete

Type:String
Aliases:Id
Position:Named
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:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

Boolean