Get-AzManagementGroupDeployment
Get deployment at a management group
Syntax
GetByDeploymentName (Default)
Get-AzManagementGroupDeployment
[-ManagementGroupId] <String>
[[-Name] <String>]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByDeploymentId
Get-AzManagementGroupDeployment
-Id <String>
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzManagementGroupDeployment cmdlet gets the deployments at the a management group. Specify the Name or Id parameter to filter the results. By default, Get-AzManagementGroupDeployment gets all deployments at the management group.
Examples
Example 1: Get all deployments at a management group
Get-AzManagementGroupDeployment -ManagementGroupId "myMG"
This command gets all deployments at the management group "myMG".
Example 2: Get a deployment by name
Get-AzManagementGroupDeployment -ManagementGroupId "myMG" -Name "Deploy01"
This command gets the "Deploy01" deployment at the management group "myMG". You can assign a name to a deployment when you create it by using the New-AzManagementGroupDeployment 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 a deployment by ID
Get-AzDeployment -Id "/providers/Microsoft.Management/managementGroups/myMG/providers/Microsoft.Resources/deployments/Deploy01"
This command gets the "Deploy01" deployment at the management group "myMG".
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
The fully qualified resource Id of the deployment. example: /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deployments/{deploymentName}
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | DeploymentId, ResourceId |
Parameter sets
GetByDeploymentId
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ManagementGroupId
The management group id.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByDeploymentName
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
The name of deployment.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | DeploymentName |
Parameter sets
GetByDeploymentName
Position: | 1 |
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 |
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.