Get-AzDeploymentOperation
Get deployment operation
Syntax
GetByDeploymentName (Default)
Get-AzDeploymentOperation
-DeploymentName <String>
[-OperationId <String>]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByDeploymentObject
Get-AzDeploymentOperation
-DeploymentObject <PSDeployment>
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzDeploymentOperation cmdlet lists all the operations that were part of a deployment to help you identify and give more information about the exact operations that failed for a particular deployment. It can also show the response and the request content for each deployment operation. This is the same information provided in the deployment details on the portal.
To get the request and the response content, enable the setting when submitting a deployment through New-AzDeployment. It can potentially log and expose secrets like passwords used in the resource property or listKeys operations that are then returned when you retrieve the deployment operations. For more on this setting and how to enable it, see New-AzDeployment and Debugging ARM template deployments
Examples
Example 1: Get deployment operations given a deployment name
Get-AzDeploymentOperation -DeploymentName test
Gets deployment operation with name "test" at the current subscription scope.
Example 2: Get a deployment and get its deployment operations
Get-AzDeployment -Name "test" | Get-AzDeploymentOperation
This command gets the deployment "test" at the current subscription scope and get its deployment operations.
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 |
-DeploymentName
The deployment name.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByDeploymentName
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DeploymentObject
The deployment object.
Parameter properties
Type: | PSDeployment |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByDeploymentObject
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-OperationId
The deployment operation Id.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByDeploymentName
Position: | Named |
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.