Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

Get-VBRAzureSubscription

Short Description

Returns subscriptions associated with a Microsoft Azure account.

Applies to

Platform: VMware, Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

This cmdlet provides 2 parameter sets.

  • For looking for subscriptions by the subscriptions name:

Get-VBRAzureSubscription -Account <VBRAzureAccount> [-Name <string[]>]  [<CommonParameters>]

  • For looking for subscriptions by the subscriptions ID:

Get-VBRAzureSubscription -Account <VBRAzureAccount> [-Id <guid[]>]  [<CommonParameters>]

Detailed Description

This cmdlet returns subscriptions associated with a selected Microsoft Azure account.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Account

Specifies the account. The cmdlet will return subscriptions associated with this account.

True

Named

True (by Value
FromPipeline,
ValueFromPipeline
ByPropertyName)

False

Name

Specifies the array of names of the subscriptions you want to get.

False

Named

False

True

Id

Specifies the array of IDs of the subscriptions you want to get.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

VBRAzureSubscription

Example 1

This example shows how to get all subscriptions associated with an account.

  1. Run Get-VBRAzureAccount to get the account. Save it to the $account variable.
  2. Run Get-VBRAzureSubscription with the $account variable.

PS C:\PS> $account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com"

PS C:\PS> Get-VBRAzureSubscription -Account $account

Example 2

This example shows how to get a subscription by the subscription name.

  1. Run Get-VBRAzureAccount to get the account. Save it to the $account variable.
  2. Run Get-VBRAzureSubscription with the $account variable. Specify the name of the subscription you want to get.

PS C:\PS> $account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com"

PS C:\PS> $subscription = Get-VBRAzureSubscription -Account $account -Name "VeeamDirectRestore2Azure"

Example 3

This example shows how to get a subscription by the subscription ID.

  1. Run Get-VBRAzureAccount to get the account. Save it to the $account variable.
  2. Run Get-VBRAzureSubscription with the $account variable. Pass the result to the Where-Object cmdlet to select the subscribtions with the Id property that equals "f482cd54-454d-419f-9ec2-f388796091f9".

PS C:\PS> $account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com"

PS C:\PS> Get-VBRAzureSubscription -Account $account | Where-Object Id -eq "f482cd54-454d-419f-9ec2-f388796091f9"

Related Commands

Get-VBRAzureAccount

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation