Get-VMHostCluster

Gets virtual machine host clusters.

Syntax

Get-VMHostCluster
   [-CimSession] <CimSession[]>
   [<CommonParameters>]
Get-VMHostCluster
   [-ClusterName] <String[]>
   [[-Credential] <PSCredential[]>]
   [<CommonParameters>]

Description

The Get-VMHostCluster cmdlet gets VMHostCluster objects.

Examples

Example 1: Get a virtual machine host cluster

PS C:\> Get-VMHostCluster -ClusterName "ContosoCluster"

This command gets the VMHostCluster object for the cluster named ContosoCluster.

Required Parameters

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Type:CimSession[]
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ClusterName

Specifies an array of names of the virtual machine host clusters that this cmdlet gets.

Type:String[]
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Credential

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

Type:PSCredential[]
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

Microsoft.HyperV.PowerShell.VMHostCluster

This cmdlet returns a VMHostCluster object.