Editar

Partilhar via


Remove-AzDeploymentScript

Removes a deployment script and its associated resources.

Syntax

Remove-AzDeploymentScript
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzDeploymentScript
      [-Id] <String>
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
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.

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

-Id

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

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

-InputObject

The deployment script PowerShell object.

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

-Name

The name of the resource group.

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

-PassThru

{{Fill PassThru Description}}

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

-ResourceGroupName

The name of the resource group.

Type:String
Position:0
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

PsDeploymentScript

Outputs

PsDeploymentScript