Get-VBROracleCloudVcn

Short Description

Returns virtual cloud networks in Oracle Cloud Infrastructure.

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

Syntax

Get-VBROracleCloudVcn -Region <VBROracleCloudRegion> -Compartment <VBROracleCloudCompartment>

[-Name <String[]>] [<CommonParameters>]

Detailed Description

This cmdlet returns an array of virtual cloud networks (VCNs) in the specified compartment of Oracle Cloud Infrastructure.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Compartment

Specifies the compartment. The cmdlet will return VCNs in this compartment.

Note: The compartment must belong to the same OCI account as the region that you specify in the Region parameter.

Accepts the VBROracleCloudCompartment object. To get this object, run the Get-VBROracleCloudCompartmentReturns compartments in Oracle Cloud Infrastructure. cmdlet.

VBROracleCloudCompartment

True

Named

True (ByPropertyName)

Name

Specifies an array of names of VCNs. The cmdlet will return VCNs with these names.

You can use wildcard characters in the names.

String[]

False

Named

False

Region

Specifies the OCI region. The cmdlet will return VCNs in this region.

Note: The region must belong to the same OCI account as the compartment that you specify in the Compartment parameter.

Accepts the VBROracleCloudRegion object. To get this object, run the Get-VBROracleCloudRegionReturns Oracle Cloud Infrastructure regions that an account is subscribed to. cmdlet.

VBROracleCloudRegion

True

Named

True (ByPropertyName, ByValue)

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

The cmdlet returns the VBROracleCloudVcn object that contains the VCN settings.

Examples

Example 1. Getting VCN by Name

This example shows how to get a VCN by its name.

$account = Get-VBROracleCloudAccount -Name "My OCI Account"

$region = Get-VBROracleCloudRegion -Account $account -Name "eu-frankfurt-1"

$compartment = Get-VBROracleCloudCompartment -Account $account -Name "Restore"

$vcn = Get-VBROracleCloudVcn -Region $region -Compartment $compartment -Name "Restore VCN"

Perform the following steps:

  1. Run the Get-VBROracleCloudAccountReturns Oracle Cloud Infrastructure accounts. cmdlet. Specify the Name parameter value. Save the result to the $account variable.
  2. Run the Get-VBROracleCloudRegionReturns Oracle Cloud Infrastructure regions that an account is subscribed to. cmdlet. Set the $account variable as the Account parameter value. Specify the Name parameter value. Save the result to the $region variable.
  3. Run the Get-VBROracleCloudCompartmentReturns compartments in Oracle Cloud Infrastructure. cmdlet. Set the $account variable as the Account parameter value. Specify the Name parameter value. Save the result to the $compartment variable.
  4. Run the Get-VBROracleCloudVcn cmdlet. Specify the following settings:
    • Set the $region variable as the Region parameter value.
    • Set the $compartment variable as the Compartment parameter value.
    • Specify the Name parameter value.

    Save the result to the $vcn variable to use it when you run the Get-VBROracleCloudSubnetReturns subnets in Oracle Cloud Infrastructure. cmdlet.

Page updated 2026-11-09

Page content applies to build 13.2.0.193