Getting Started With HCX PowerCli Module

With the release of PowerCli 11.2, support for many new VMware products was introduced, including VMware HCX. The PowerCli module name for HCX is “VMware.VimAutomation.HCX” and it currently has 20 cmdlets to manage HCX.

You can use Windows Power Shell to install/upgrade your PowerCLI to v11.2 using the below commands:

1: Once the necessary module is installed, we can use the Get-Command to examine the cmdlets that are available for HCX.

2: Authenticate with HCX: To connect to the HCX Manager, we need to use the Connect-HCXServer cmdlet.

3: Check deployed appliances: To check the appliances deployed via HCX, we can use the Get-HCXAppliance cmdlet.

In the above example, we can see that we have 2 appliances deployed and their types. This is the same information that is visible in the vSphere web client under the “HCX Components” tab.

4: Verify the status of interconnect (fleet) appliances: The Get-HCXInterconnectStatus cmdlet shows the status of the fleet appliance and the tunnel. Tunnel status shows whether or not connectivity between the on-premises and cloud side HCX is OK. 

5: Verify site details: The get-HCXSite cmdlet shows the HCX site information. We can use 2 additional parameters with this cmdlet “source and destination” to view info specific to a site. If no parameter is used, the cmdlet only shows source site information by default.

6: Verify site pairing: The Get-HCXSitePairing cmdlet shows the registration of On-prem HCX with the Cloud site.

7: Get VDS details

And that’s it for this post. I am new to HCX cmdlets and currently exploring more and more on this. 

Helpful Articles

HCX PowerCli

Automating HCX configuration for VMC

Leave a Reply