Move an Connected ESXi host between vCenters via PowerCLI

PowerCLI

A interactive PowerCLI script to disconnect an ESXi host (not in maintenance mode) from the source vCenter and add to a cluster on the destination vCenter.
Each VC is NOT in the same SSO domain.
The end goal is to drain the source vCenter of all hosts so the old vCenter can be decommissioned.

This assumes due diligence in recording DRS/SDRS rules, vDS/VMK’s.
https://kb.vmware.com/s/article/1004775

Tested
VMware PowerCLI 12.4.1.18769701
vCenter – 7.0.2, 17694817
VMware ESXi – 7.0.2, 17867351

Menu