how to get the cluster id in VMWARE PowerCLI or VMWARE SDK? I need to list the clusters and pick the id for a given cluster?
Get-Datacenter
or
Get-Cluster
option 1
get-cluster | select ID
It will list the IDs of all the clusters with the header
option 2
(get-cluster).ID
It will list the IDs of all the clusters without the header
option 3
get-cluster MyCluster | select ID
It will list the ID of the cluster MyCluster with the header
option 4
(get-cluster MyCluster ).ID
It will list the ID of the cluster MyCluster without the header
Just run all these to know the difference