PowerCLI Reference

Get-HCXNetwork

Synopsis

This cmdlet retrieves a list of HCX networks.

Syntax

Get-HCXNetwork [[-Name] <String[]>] -Appliance <HCXAppliance> [-Server <HcxServer[]>] [-Site <HCXSite[]>] [-Type <NetworkType>] [<CommonParameters>]

Get-HCXNetwork [[-Name] <String[]>] [-Server <HcxServer[]>] [-Site <HCXSite[]>] [-Type <NetworkType>] [<CommonParameters>]

Get-HCXNetwork [-Server <HcxServer[]>] -Uid <String[]> [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves a list of HCX networks. If the HCXSite is not passed as input, the source site networks are listed. You can create new HCX migration, replication, network extension, and appliance requests by using the output of the cmdlet.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specifies the name of the HCX network.falseFalse
ApplianceHCXApplianceSpecifies the L2Concentrator appliance to filter networks.trueTrue (ByValue)
ServerHcxServer[]Specifies the HCX Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-HCXServer cmdlet.falseFalse
SiteHCXSite[]Specifies the HCX site for which you want to list the networks. If this parameter is not specified, the default one is selected from the source site.falseTrue (ByValue)
TypeNetworkTypeSpecifies the type of the HCX network. The valid values are Network, DistributedVirtualPortgroup, VirtualWire, and VirtualNetwork.falseFalse
UidString[]Specifies the Uid of the HCX network.


Note: When a list of values is specified for the Uid parameter, the returned objects have a Uid that matches exactly one of the string values in the list.
trueFalse

Return Type

VMware.VimAutomation.Hcx.Types.V1.HCXNetwork

Notes

Examples

-------------------------- Example 1 --------------------------

PS C:\> Get-HCXNetwork

Retrieves the available HCX network at the source site.

-------------------------- Example 2 --------------------------

PS C:\> Get-HCXNetwork -Name "myNetworkName"

Retrieves the HCX network by name at the source site.

-------------------------- Example 3 --------------------------

PS C:\> Get-HCXNetwork -Type DistributedVirtualPortgroup

Retrieves the HCX network by type at the source site.

-------------------------- Example 4 --------------------------

PS C:\> $myDestination = Get-HCXSite -Destination -Name "myDestinationName"
        Get-HCXNetwork -Site $myDestination

Retrieves the HCX network by destination site.

-------------------------- Example 5 --------------------------

PS C:\> $myL2concentrator = Get-HCXAppliance -Type L2Concentrator -Name "myL2ConcentratorName"
        Get-HCXNetwork -Appliance $myL2concentrator

Retrieves the HCX network by L2Concentrator.

-------------------------- Example 6 --------------------------

PS C:\> $myNetwork = Get-HCXNetwork -Name "myNetworkName"
        Get-HCXNetwork -Uid $myNetwork.Uid

Retrieves the HCX network by Uid.


Copyright © VMware, Inc. All rights reserved.