Editar

Compartir a través de


Get-VMHostCluster

Gets virtual machine host clusters.

Syntax

Get-VMHostCluster
   [-ClusterName] <String[]>
   [[-Credential] <PSCredential[]>]
   [<CommonParameters>]
Get-VMHostCluster
   [-CimSession] <CimSession[]>
   [<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.

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
Required:True
Accept pipeline input:True
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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-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
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Outputs

Microsoft.HyperV.PowerShell.VMHostCluster

This cmdlet returns a VMHostCluster object.