Test-SCVMHostCluster

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

Description

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

For more information about Test-SCVMHostCluster, type: "Get-Help Test-SCVMHostCluster -online".

Parameters

VMHostCluster

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM host cluster object.

Credential

Required? false
Accept Pipeline Input? false
Position? named
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".

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an array of virtual machine host objects.

Credential

Required? false
Accept Pipeline Input? false
Position? named
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".

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

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.
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.

See Also