Retrieving clusters
To retrieve one or more of the clusters available on your vCenter Server system, you can use the Get-Cluster
cmdlet. The syntax of the Get-Cluster
cmdlet is as follows. The first parameter set is for retrieving clusters in a specific location such as a data center or a folder:
Get-Cluster [[-Name] <String[]>] [-Location <VIContainer[]>]
[-NoRecursion] [-Tag <Tag[]>] [-Server <VIServer[]>]
[<CommonParameters>]
The second parameter set is for retrieving clusters by a related object.
Get-Cluster [-RelatedObject] <ClusterRelatedObjectBase[]>
[<CommonParameters>]
The third parameter set is to retrieve clusters containing specific virtual machines or ESXi hosts:
Get-Cluster [[-Name] <String[]>] [-VM <VirtualMachine[]>]
[-VMHost <VMHost[]>] [-Tag <Tag[]>] [-Server <VIServer[]>]
[<CommonParameters>]
The fourth parameter set is to retrieve clusters by ID:
...