Get-AzResourceGroupDeployment
Gets the deployments in a resource group.
Syntax
GetByResourceGroupDeploymentName (Default)
Get-AzResourceGroupDeployment
[-ResourceGroupName] <String>
[[-Name] <String>]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByResourceGroupDeploymentId
Get-AzResourceGroupDeployment
-Id <String>
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzResourceGroupDeployment cmdlet gets the deployments in an Azure resource group. Specify the Name or Id parameter to filter the results. By default, Get-AzResourceGroupDeployment gets all deployments for a specified resource group. An Azure resource is a user-managed Azure entity, such as a database server, database, or web site. An Azure resource group is a collection of Azure resources that are deployed as a unit. A deployment is the operation that makes the resources in the resource group available for use. For more information about Azure resources and Azure resource groups, see the New-AzResourceGroup cmdlet. You can use this cmdlet for tracking. For debugging, use this cmdlet with the Get-AzLog cmdlet.
Examples
Example 1: Get all deployments for a resource group
Get-AzResourceGroupDeployment -ResourceGroupName "ContosoLabsRG"
This command gets all deployments for the ContosoLabsRG resource group. The output shows a deployment for a WordPress blog that used a gallery template.
Example 2: Get a deployment by name
Get-AzResourceGroupDeployment -ResourceGroupName "ContosoLabsRG" -Name "DeployWebsite01"
This command gets the DeployWebsite01 deployment of the ContosoLabsRG resource group. You can assign a name to a deployment when you create it by using the New-AzResourceGroup or New-AzResourceGroupDeployment 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.
Example 3: Get the deployments of all resource groups
Get-AzResourceGroup | Get-AzResourceGroupDeployment | Format-Table ResourceGroupName, DeploymentName, ProvisioningState
This command gets all resource groups in your subscription by using the Get-AzResourceGroup cmdlet. The command passes the resource groups to the current cmdlet by using the pipeline operator. The current cmdlet gets all deployments of all resource groups in the subscription, and passes the results to the Format-Table cmdlet to display their ResourceGroupName, DeploymentName, and ProvisioningState property values.
Parameters
-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 |
-Id
Specifies the ID of the resource group deployment to get.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | DeploymentId, ResourceId |
Parameter sets
GetByResourceGroupDeploymentId
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies the name of the deployment to get. Wildcard characters are not permitted.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | DeploymentName |
Parameter sets
GetByResourceGroupDeploymentName
Position: | 1 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Pre
Indicates that this cmdlet considers pre-release API versions when it automatically determines 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 |
-ResourceGroupName
Specifies the name of a resource group. The cmdlet gets the deployments for the resource group that this parameter specifies. Wildcard characters are not permitted. This parameter is required and you can specify only one resource group in each command.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByResourceGroupDeploymentName
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
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.