Get-HCXContainer Command | Vmware PowerCLI Reference

Get-HCXContainer

This cmdlet retrieves a list of HCX containers of type ComputeContainer, Host, Datacenter, Folder, Cluster, ResourcePool, and ComputeResource at the HCXSite. If the HCXSite is not passed as input, then source site containers are listed. You can create new HCX migration and replication requests by using the output of the cmdlet.

Syntax

Get-HCXContainer
-Uid < String[] >
[-ProgressAction < ActionPreference > ]
[-Server < HcxServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Uid String[] named
Specifies the Uid of the HCX container. 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.
optional ProgressAction ActionPreference named
optional Server HcxServer[] named
  • wildcards
Specifies the HCX Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-HCXServer cmdlet.
Get-HCXContainer
[-Name < String[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < HcxServer[] > ]
[-Site < HCXSite[] > ]
[-Type < ContainerType > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Name String[] named
  • wildcards
Specifies the name of the HCX container.
optional ProgressAction ActionPreference named
optional Server HcxServer[] named
  • wildcards
Specifies the HCX Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-HCXServer cmdlet.
optional Site HCXSite[] named
  • pipeline
Specifies the HCX site for which you want to list the containers. If this parameter is not specified, the default one is selected from the source site.
optional Type ContainerType named
Specifies the type of the HCX container. The valid values are ComputeContainer, Host, Datacenter, Folder, Cluster, ResourcePool, and ComputeResource.

Output

VMware.VimAutomation.Hcx.Types.V1.HCXContainer

Examples

Example 1

Get-HCXContainer

Retrieves the available HCX containers at the source site.

Example 2

Get-HCXContainer -Type Folder

Retrieves the available HCX containers of type Folder at the source site.

Example 3

Get-HCXContainer -Name "onpremDC*"

Retrieves the HCX containers by name at the source site.

Example 4

$myDestination = Get-HCXSite -Destination
        Get-HCXContainer -Site $myDestination

Retrieves the HCX containers from the destination site.

Example 5

$myContainer = Get-HCXContainer -Name "myContainerName"
        Get-HCXContainer -Uid $myContainer.Uid

Retrieves the HCX container by Uid.

Related Commands

HCXContainer

This cmdlet retrieves the list of HCX containers.