Note

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

Access to this page requires authorization. You can try .

Remove-AzDeploymentScript

Removes a deployment script and its associated resources.

Syntax

RemoveDeploymentScriptLogByName (Default)

Remove-AzDeploymentScript
 [-ResourceGroupName] <String>
 [-Name] <String>
 [-PassThru]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

RemoveDeploymentScriptLogByResourceId

Remove-AzDeploymentScript
 [-Id] <String>
 [-PassThru]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

RemoveDeploymentScriptLogByInputObject

Remove-AzDeploymentScript
 [-InputObject] <PsDeploymentScript>
 [-PassThru]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

The Remove-AzDeploymentScript cmdlet removes a deployment script and its associated resources.

Examples

Example 1

Remove-AzDeploymentScript -Name MyDeploymentScript -ResourceGroupName DS-TestRg

Deletes a deployment script with the name MyDeploymentScript in resource group DS-TestRG.

Parameters

-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

-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

The fully qualified resource Id of the deployment script. Example: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Resources/deploymentScripts/{deploymentScriptName}

Parameter properties

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

Parameter sets

-InputObject

The deployment script PowerShell object.

Parameter properties

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

Parameter sets

-Name

The name of the resource group.

Parameter properties

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

Parameter sets

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Parameter properties

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

Parameter sets

-ResourceGroupName

The name of the resource group.

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:None
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

PsDeploymentScript

Outputs

PsDeploymentScript


Feedback

Was this page helpful?