Edit

Remove-AzSubscriptionDeploymentStackWhatIfResult

Removes a subscription scoped deployment stack WhatIf result.

Syntax

RemoveByName (Default)

Remove-AzSubscriptionDeploymentStackWhatIfResult
    [-Name] <String>
    [-PassThru]
    [-Force]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

RemoveByResourceId

Remove-AzSubscriptionDeploymentStackWhatIfResult
    -ResourceId <String>
    [-PassThru]
    [-Force]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

RemoveByInputObject

Remove-AzSubscriptionDeploymentStackWhatIfResult
    [-InputObject] <PSDeploymentStackWhatIfResult>
    [-PassThru]
    [-Force]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

Description

Removes a subscription scoped deployment stack WhatIf result resource. This cmdlet works with persisted deployment stack WhatIf result resources.

Examples

Example 1: Use Remove-AzSubscriptionDeploymentStackWhatIfResult

Remove-AzSubscriptionDeploymentStackWhatIfResult -Name MyWhatIfResult -Force

Removes the deployment stack WhatIf result named MyWhatIfResult.

Example 2: Remove a subscription scoped deployment stack WhatIf result by resource ID

$whatIfResultId = "/subscriptions/$((Get-AzContext).Subscription.Id)/providers/Microsoft.Resources/deploymentStacksWhatIfResults/MyWhatIfResult"
Remove-AzSubscriptionDeploymentStackWhatIfResult -ResourceId $whatIfResultId -Force

Removes the deployment stack WhatIf result by its fully-qualified resource ID.

Example 3: Remove a subscription scoped deployment stack WhatIf result from an input object

$result = Get-AzSubscriptionDeploymentStackWhatIfResult -Name MyWhatIfResult
$result | Remove-AzSubscriptionDeploymentStackWhatIfResult -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

-InputObject

The WhatIf result PS object.

Parameter properties

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

Parameter sets

RemoveByInputObject
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
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

RemoveByName
Position:0
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.

Inputs

String

PSDeploymentStackWhatIfResult

Outputs

Boolean