Getting Started With HCX PowerCli Module

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

You can use windows power shell to install/upgrade your PowerCli to v11.2 using below commands:

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

Get-Command -Module VMware.VimAutomation.HCX

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

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

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

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

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

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

7: Get vDS details

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

Helpful Articles

HCX PowerCli

Automating HCX configuration for VMC