Get-HAPrimaryVMHost Command | Vmware PowerCLI Reference

Get-HAPrimaryVMHost

On vCenter Server 5.0 and later, the cmdlet retrieves the primary 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[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Cluster Cluster[] named
  • pipeline
  • wildcards
Specifies the clusters for which you want to retrieve the HA primary hosts.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

Output

VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost

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.

Related Commands

HAPrimaryVMHost

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