vSphere PowerCLI Reference

Get-HAPrimaryVMHost

Synopsis

On vCenter Server 5.0 and later, the cmdlet retrieves the master host of the specified HA cluster. On vCenter Server versions earlier than 5.0, the cmdlet retrieves the primary HA (High-Availability) hosts for the specified clusters.

Syntax

Get-HAPrimaryVMHost [[-Cluster] <Cluster[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

On vCenter Server 5.0 and later, the cmdlet retrieves the master host of the specified HA cluster.
On vCenter Server versions earlier than 5.0, the cmdlet retrieves the primary HA (High-Availability) hosts for the specified clusters.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ClusterCluster[]Specify the clusters for which you want to retrieve the HA primary hosts.falsetrue (ByValue)
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type

VMHost

Notes

Examples

-------------- Example 1 --------------

Get-Cluster | Get-HAPrimaryVMHost

Retrieves the HA primary hosts of the available cluster.

-------------- Example 2 --------------

Get-HAPrimaryVMHost Cluster

Retrieves the HA primary host of the cluster named Cluster.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.