Remove-AzManagementGroupDeploymentStackWhatIfResult
Removes a management group scoped deployment stack WhatIf result.
Syntax
RemoveByNameAndManagementGroupId (Default)
Remove-AzManagementGroupDeploymentStackWhatIfResult
[-Name] <String>
[-ManagementGroupId] <String>
[-PassThru]
[-Force]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
RemoveByResourceId
Remove-AzManagementGroupDeploymentStackWhatIfResult
-ResourceId <String>
[-PassThru]
[-Force]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
Remove-AzManagementGroupDeploymentStackWhatIfResult
[-InputObject] <PSDeploymentStackWhatIfResult>
[-PassThru]
[-Force]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
Description
Removes a management group scoped deployment stack WhatIf result resource. This cmdlet works with persisted deployment stack WhatIf result resources.
Examples
Example 1: Use Remove-AzManagementGroupDeploymentStackWhatIfResult
Remove-AzManagementGroupDeploymentStackWhatIfResult -Name MyWhatIfResult -ManagementGroupId MyManagementGroup -Force
Removes the deployment stack WhatIf result named MyWhatIfResult.
Example 2: Remove a management group scoped deployment stack WhatIf result by resource ID
$whatIfResultId = "/providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Resources/deploymentStacksWhatIfResults/MyWhatIfResult"
Remove-AzManagementGroupDeploymentStackWhatIfResult -ResourceId $whatIfResultId -Force
Removes the deployment stack WhatIf result by its fully-qualified resource ID.
$result = Get-AzManagementGroupDeploymentStackWhatIfResult -Name MyWhatIfResult -ManagementGroupId MyManagementGroup
$result | Remove-AzManagementGroupDeploymentStackWhatIfResult -Force
Removes a deployment stack WhatIf result passed through the pipeline.
Parameters
-AcquirePolicyToken
Acquire an Azure Policy token automatically for this resource operation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ChangeReference
The change reference resource ID for this resource operation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Force
Do not ask for confirmation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The WhatIf result PS object.
RemoveByInputObject
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ManagementGroupId
The ID of the management group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RemoveByNameAndManagementGroupId
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
The name of the WhatIf result to delete.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RemoveByNameAndManagementGroupId
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PassThru
If set, a boolean will be returned with value dependent on cmdlet success.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Pre
When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The fully-qualified resource ID of the WhatIf result to delete.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Id
Parameter sets
RemoveByResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
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 .
Outputs