Test-SCVMHostCluster

Validates whether hosts that are managed by VMM are suitable as nodes of a failover cluster.

Syntax

Test-SCVMHostCluster
    -VMHostCluster <HostCluster>
    [-Credential <VMMCredential>]
    [-VMMServer <ServerConnection>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]
Test-SCVMHostCluster
    -VMHost <Host[]>
    [-Credential <VMMCredential>]
    [-VMMServer <ServerConnection>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Test-SCVMHostCluster cmdlet validates whether one or more hosts that are managed by Virtual Machine Manager (VMM) are suitable as a node of a failover cluster.

Examples

Example 1: Validate nodes to be clustered

PS C:\> $HostGroup = Get-SCVMHostGroup -Name "New York"
PS C:\> $Nodes = Get-SCVMHost | where {$_.Name -like "Cluster*" -and $_.VMHostGroup -eq $HostGroup} 
PS C:\> $Result = Test-SCVMHostCluster -VMHost $Nodes
PS C:\> Write-Output $Result.ValidationResult
PS C:\> Write-Output $Result.ResultFileLocation

The first command gets the host group object named New York in All Hosts and stores the object in the $HostGroup variable.

The second command gets all host objects with names beginning with "Cluster" from the New York host group and stores the objects in the $Nodes variable.

The third command validates the host objects stored in $Nodes for failover cluster creation and stores the results in $Result.

The fourth command displays the validation result to the user.

The last command displays the location of the validation report file to the user.

Example 2: Validate an existing cluster

PS C:\> $Cluster = Get-SCVMHostCluster -Name "Cluster01"
PS C:\> $Result = Test-SCVMHostCluster -VMHostCluster $Cluster
PS C:\> Write-Output $Result.ValidationResult 
PS C:\> Write-Output $Result.ResultFileLocation

The first command gets the cluster object named Cluster01 and stores the object in the $Cluster variable.

The second command tests the cluster stored in $Cluster and stores the results of the test in $Result.

The third command displays the results for the user.

The last command displays the location of the validation report file for the user.

Parameters

-Credential

Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task.

For more information about the PSCredential object, type Get-Help Get-Credential. For more information about Run As accounts, type Get-Help New-SCRunAsAccount.

Type:VMMCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMHost

Specifies an array of virtual machine host objects.

Type:Host[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMHostCluster

Specifies a VMM host cluster object.

Type:HostCluster
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Outputs

ClusterValidationResult

This cmdlet returns a ClusterValidationResult object.