Get-VBRAzureVirtualNetwork

Short Description

Returns Microsoft Azure virtual networks available for a subscription.

Applies to

Platform: VMware, Hyper-V

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

Syntax

Get-VBRAzureVirtualNetwork -Subscription <VBRAzureSubscription> [-Name <string[]>] [-Location <VBRAzureLocation>] [<CommonParameters>]

Detailed Description

This cmdlet returns virtual networks available for a Microsoft Azure subscription.

Important

This cmdlet does not support Microsoft Azure accounts with the Azure Service Manager type of a subscription (ASM, also known as a "classic" type subscription).

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Subscription

Specifies a subscription. The cmdlet will return virtual networks associated with this subscription.

Accepts the VBRAzureSubscription object. To get this object, run the Get-VBRAzureSubscription cmdlet.

True

Named

True (ByValue, ByPropertyName)

Name

Specifies an array of names. The cmdlet will return virtual networks that match the specified names.

String[]

False

Named

False

Location

Specifies geographical locations of Microsoft Azure datacenters available for the virtual network.

Accepts the VBRAzureLocation object. To get this object, run the Get-VBRAzureLocation cmdlet.

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Return Type

VBRAzureVirtualNetwork

Example 1

This example shows how to get all virtual networks 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-VBRAzureVirtualNetwork with the $subscription variable.

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

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

Get-VBRAzureVirtualNetwork -Subscription $subscription

Example 2

This example shows how to get a virtual network by the virtual network 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 the subscription to the $subscription variable.
  3. Run Get-VBRAzureVirtualNetwork with the $subscription variable. Specify the name of the virtual network you want to get.

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

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

Get-VBRAzureVirtualNetwork -Subscription $subscription -Name "VeeamInternalNetwork"

Related Commands

Get-VBRAzureSubscription