Get-AzureRmDeploymentOperation

Get deployment operation

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Get-AzureRmDeploymentOperation
   -DeploymentName <String>
   [-OperationId <String>]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeploymentOperation
   -DeploymentObject <PSDeployment>
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzureRmDeploymentOperation 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-AzureRmDeployment. 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-AzureRmDeployment and Debugging ARM template deployments

Examples

Get deployment operations given a deployment name

PS C:\>Get-AzureRmDeploymentOperation -DeploymentName test

Gets deployment operation with name "test" at the current subscription scope.

Get a deployment and get its deployment operations

PS C:\>Get-AzureRmDeployment -Name "test" | Get-AzureRmDeploymentOperation

This command gets the deployment "test" at the current subscription scope and get its deployment operations.

Parameters

-ApiVersion

When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the latest available.

Type:String
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:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeploymentName

The deployment name.

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

-DeploymentObject

The deployment object.

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

-OperationId

The deployment operation Id.

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

String

System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Outputs

PSDeploymentOperation