Test-SCVMHostCluster
Test-SCVMHostCluster
Validates whether hosts that are managed by VMM are suitable as a nodes of a failover cluster.
構文
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>]
詳細説明
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.
パラメーター
-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. 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
.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-PROTipID<Guid]>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VMHost<Host[]>
Specifies an array of virtual machine host objects.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-VMHostCluster<HostCluster>
Specifies a VMM host cluster object.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- ClusterValidationResult
例
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