--- title: "Get-VBRAmazonEC2Subnet" description: "Returns an array of Amazon VPC subnets. Platform: VMware, Hyper-V Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License This cmdlet provides the following parameter sets: This cmdlet returns an array of subnets th" canonical: "https://helpcenter.veeam.com/docs/vbr/powershell/get-vbramazonec2subnet.html" breadcrumb: "Veeam PowerShell Reference > Veeam PowerShell Reference > Data Recovery > Restore to Amazon EC2 > Get-VBRAmazonEC2Subnet" dateModified: "2026-08-19" --- # Get-VBRAmazonEC2Subnet ## Short Description Returns an array of Amazon VPC subnets. **Platform**: VMware, Hyper-V **Product Edition**: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License ## Syntax This cmdlet provides the following parameter sets: ## Detailed Description This cmdlet returns an array of subnets that are available in the selected Amazon VPC. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

AvailabilityZone

Specifies the Availability Zone.

The cmdlet will return the Amazon VPC subnet that resides in the specified Availability Zone.

String

False

Named

False

Name

Specifies the IP range. The cmdlet will return the Amazon VPC subnet with this IP range.

String

True

Named

False

VPC

Specifies the Amazon VPC.

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

VBRAmazonEC2VPC

True

Named

False

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see [ Microsoft Docs](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7). ## Output Object [`VBRAmazonEC2Subnet`](vbramazonec2subnet.md) ## Examples ::: example ### Getting Amazon VPC Subnet by Availability Zone This example shows how to get the Amazon VPC subnet by geographic location and the associated Availability Zone. ``` $account = Get-VBRAmazonAccount -Id "936edf7c-7cf3-4dbd-9895-c7485ef4bb2c" $region = Get-VBRAmazonEC2Region -Account $account -RegionType Global -Name "ap-northeast-1" $vpc = Get-VBRAmazonEC2VPC -Region $region Get-VBRAmazonEC2Subnet -VPC $vpc -AvailabilityZone "eu-west-1a" ``` Perform the following steps: 1. Run the [`Get-VBRAmazonAccount`](get-vbramazonaccount.md) cmdlet. Specify the `Id` parameter value. Save the result to the `$account` variable. 2. Run the [`Get-VBRAmazonEC2Region`](get-vbramazonec2region.md) cmdlet. Set the `$account` variable as the `Account` parameter value. Set the `Global` value as the `RegionType` parameter value. Specify the `Name` parameter value. Save the result to the `$region` variable. 3. Run the [`Get-VBRAmazonEC2VPC`](get-vbramazonec2vpc.md) cmdlet. Set the `$region` variable as the `Region` parameter value. Save the result to the `$vpc` variable. 4. Run the `Get-VBRAmazonEC2Subnet` cmdlet. Set the `$vpc` variable as the `VCP` parameter value. Specify the `AvailabilityZone` parameter value. ::: ## Related Commands - [`Get-VBRAmazonAccount`](get-vbramazonaccount.md) - [`Get-VBRAmazonEC2Region`](get-vbramazonec2region.md) - [`Get-VBRAmazonEC2VPC`](get-vbramazonec2vpc.md)