I know how to get the list of hosts in a cluster using PowerCLI connecting to vCenter, but is there a way to get the name or ID of the cluster a host is in from the ESXi (5.5) command line? Thanks.
You can try using the following command :
Get-VMhost |ft name,parent
That should give you the ESX host + parent object which in this case is the cluster.
Right now am not infront of the vmlab or prod environ,
So below PS would be of a help please try out and let me know
Thenget cluster name by typing:
Get-ClusterNameFromVM -VMName ‘SomeVMname’ -VmsToHostHash $VmsToHostHash -HostToClusterHash $HostToClusterHash