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[]>] ...
Get Learning PowerCLI - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.