Bearbeiten

Freigeben über


Get-AzDeployment

Get deployment

Syntax

Get-AzDeployment
   [[-Name] <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzDeployment
   -Id <String>
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzDeployment cmdlet gets the deployments at the current subscription scope. Specify the Name or Id parameter to filter the results. By default, Get-AzDeployment gets all deployments at the current subscription scope.

Examples

Example 1: Get all deployments at subscription scope

Get-AzDeployment

This command gets all deployments at the current subscription scope.

Example 2: Get a deployment by name

Get-AzDeployment -Name "DeployRoles01"

This command gets the DeployRoles01 deployment at the current subscription scope. You can assign a name to a deployment when you create it by using the New-AzDeployment cmdlets. If you do not assign a name, the cmdlets provide a default name based on the template that is used to create the deployment.

Parameters

-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. example: /subscriptions/{subId}/providers/Microsoft.Resources/deployments/{deploymentName}

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

-Name

The name of deployment.

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

Inputs

None

Outputs

PSDeployment