Test-SCVMHostCluster
Test-SCVMHostCluster
Validates whether hosts that are managed by VMM are suitable as a nodes of a failover cluster.
Syntax
Parameter Set: ValidateCluster
Test-SCVMHostCluster -VMHostCluster <HostCluster> [-Credential <PSCredential> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: ValidateNodes
Test-SCVMHostCluster -VMHost <Host[]> [-Credential <PSCredential> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed Description
The Test-SCVMHostCluster cmdlet validates whether one or more hosts that are managed by Virtual Machine Manager (VMM) is suitable as a node of a failover cluster.
Parameters
-Credential<PSCredential>
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.
For more information about the PSCredential object, type Get-Help Get-Credential
. For more information about Run As accounts, type Get-Help New-SCRunAsAccount
.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PROTipID<Guid]>
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMHost<Host[]>
Specifies an array of virtual machine host objects.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-VMHostCluster<HostCluster>
Specifies a VMM host cluster object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- ClusterValidationResult
Examples
Example 1: Validate nodes to be clustered
The first command gets the host group object named New York in All Hosts, and then 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 then stores the objects in the $Nodes variable.
The third command validates the host objects stored in $Nodes for failover cluster creation, and then 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.
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
Example 2: Validate an existing cluster
The first command gets the cluster object named Cluster01, and then stores the object in the $Cluster variable.
The second command tests the cluster stored in $Cluster, and then 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.
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