Get-VBRAzureResourceGroup

In this article

    Short Description

    Returns Microsoft Azure resource groups available for a subscription.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    Get-VBRAzureResourceGroup -Subscription <VBRAzureSubscription> [-Name <string[]>]  [<CommonParameters>]

    Detailed Description

    This cmdlet returns resource groups available for a selected subscription.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Subscription

    Specifies the subscription. The cmdlet will return resource groups associated with this subscription.

    True

    Named

    True (ByValue,
    ByProperty
    Name)

    False

    Name

    Specifies the array of names. The cmdlet will return resource groups that match the specified names.

    False

    Named

    False

    True

    <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

    VBRAzureResourceGroup

    Example 1

    This example shows how to get all resource groups associated with a subscription.

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

    $account = Get-VBRAzureAccount -Name "RestoreToAzureRM@Veeam.com"

    $subscription = Get-VBRAzureSubscription -Account $account -Name "VeeamDirectRestore2Azure"

    Get-VBRAzureResourceGroup -Subscription $subscription

    Example 2

    This example shows how to get a resource group by the resource group name.

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

    $account = Get-VBRAzureAccount -Name "RestoreToAzureRM@Veeam.com"

    $subscription = Get-VBRAzureSubscription -Account $account -Name "VeeamDirectRestore2Azure"

    Get-VBRAzureResourceGroup -Subscription $subscription -Name "VeeamResourceGroup"

    Related Commands

    Get-VBRAzureSubscription