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:
Get-Cluster [-VM <VirtualMachine[]>] [-VMHost <VMHost[]>] [-Location <VIContainer[]>] [[-Name] <String[]>] [-NoRecursion] [-Server <VIServer[]>] [<CommonParameters>] Get-Cluster -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
The -Location
parameter enables you to filter for clusters in a specific location such as a datacenter or folder. The -Name
, -Id
, -VM
, and -VMHost
parameters specify filters that you can use to retrieve clusters with a specific name or ID, or clusters containing the specified virtual machines or hosts.
In the first example, you will retrieve ...
Get Learning PowerCLI 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.