Get-AzureRmDeployment

Get deployment

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-AzureRmDeployment
   [[-Name] <String>]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeployment
   [-Id <String>]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

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

Examples

Example 1: Get all deployments at subscription scope

PS C:\>Get-AzureRmDeployment

This command gets all deployments at the current subscription scope.

Example 2: Get a deployment by name

PS C:\>Get-AzureRmDeployment -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-AzureRmDeployment 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

-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

-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:False
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

String

Outputs

PSDeployment