Test-SCVMHostCluster
Validates whether hosts that are managed by VMM are suitable as nodes of a failover cluster.
Syntax
ValidateCluster
Test-SCVMHostCluster
-VMHostCluster <HostCluster>
[-Credential <VMMCredential>]
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
ValidateNodes
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
.
Parameter properties
Type: | VMMCredential |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VMHost
Specifies an array of virtual machine host objects.
Parameter properties
Type: | Host[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ValidateNodes
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VMHostCluster
Specifies a VMM host cluster object.
Parameter properties
Type: | HostCluster |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ValidateCluster
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VMMServer
Specifies a VMM server object.
Parameter properties
Type: | ServerConnection |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
ClusterValidationResult
This cmdlet returns a ClusterValidationResult object.