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:
- For looking for subscriptions by the subscriptions ID:
Detailed Description
This cmdlet returns subscriptions associated with a selected Microsoft Azure account.
Parameters
Parameter | Description | Required | Position | Accept | Accept |
Account | Specifies the account. The cmdlet will return subscriptions associated with this account. | True | Named | True (ByValue, | 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
Example 1
This example shows how to get all subscriptions associated with an account.
- Run Get-VBRAzureAccount to get the account. Save it to the $account variable.
- Run Get-VBRAzureSubscription with the $account variable.
$account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com" Get-VBRAzureSubscription -Account $account |
Example 2
This example shows how to get a subscription by the subscription name.
- Run Get-VBRAzureAccount to get the account. Save it to the $account variable.
- Run Get-VBRAzureSubscription with the $account variable. Specify the name of the subscription you want to get.
$account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com" $subscription = Get-VBRAzureSubscription -Account $account -Name "VeeamDirectRestore2Azure" |
Example 3
This example shows how to get a subscription by the subscription ID.
- Run Get-VBRAzureAccount to get the account. Save it to the $account variable.
- 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".
$account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com" Get-VBRAzureSubscription -Account $account | Where-Object Id -eq "f482cd54-454d-419f-9ec2-f388796091f9" |
Related Commands