description | external help file | Module Name | ms.date | online version | schema | title |
---|---|---|---|---|---|---|
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell. |
Microsoft.FailoverClusters.PowerShell.dll-Help.xml |
FailoverClusters |
11/23/2022 |
2.0.0 |
Test-Cluster |
Runs validation tests for failover cluster hardware and settings.
Test-Cluster [[-Node] <StringCollection>] [-Disk <Object[]>] [-Pool <Object[]>]
[-ReportName <String>] [-List] [-Include <StringCollection>] [-Ignore <StringCollection>] [-Force]
[-InputObject <PSObject>] [-Cluster <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
The Test-Cluster
cmdlet runs validation tests for failover cluster hardware and settings. Tests
can be run both before and after a cluster is set up.
Test results are captured in a file with the file name that you specify. By running the validation
tests, you can confirm that your hardware and settings are compatible with Failover Clustering.
There are multiple types of tests, including Cluster, Inventory, Network, Storage, System, and other
types of tests. Storage tests will not test online disks or storage pools that are in use by a
clustered role. To test such disks, first run Stop-ClusterGroup
to stop the clustered role, and
then run Test-Cluster
. After the tests are done, start the clustered roles, also known as resource
groups, again.
Note
To perform some of the Cluster Shared Volume (CSV) validation tests, the Test-Cluster
command
creates a local user account named CliTest2 on each cluster node. The account is automatically
removed from your system after the cluster validation tests are completed.
Test-Cluster
This example runs all applicable cluster validation tests on the local cluster.
Test-Cluster -Node "node1", "node2"
This example runs all cluster validation tests on the nodes named node1
and node2
. If either
node1
or node2
is already a member of a cluster, then the tests will include all nodes in that
cluster.
Test-Cluster -List
This example lists the names of all tests and categories in cluster validation. Specify these test names with Ignore or Include parameters to run specific tests.
Test-Cluster -Node "node1", "node2" -Include "Storage"
This example runs the storage validation tests on the nodes named node1 and node2. If either node1 or node2 is already a member of a cluster, then the tests will include all nodes in that cluster.
Test-Cluster -Node "node1", "node2" -Ignore Inventory
This example runs all validation tests except the Inventory tests on the nodes named node1 and node2. If either node1 or node2 is already a member of a cluster, then the tests will include all nodes in that cluster.
Test-Cluster -Include "List Potential Cluster Disks"
This example runs the test called List Potential Cluster Disks on the local cluster.
Test-Cluster -Include "List System Drivers","List Unsigned Drivers"
This example runs the tests called List System Drivers and List Unsigned Drivers on the local cluster.
Specifies the name of the cluster on which to run this cmdlet. If the input for this parameter is
.
or it is omitted, then the cmdlet runs on the local cluster.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Specifies the disk number or disks for which to run the cmdlet. If the specified disk is online and is assigned to a clustered role or Cluster Shared Volume, you must also specify the Force parameter to take the disk offline for the duration of the storage tests. Otherwise, the specified disk must be offline before the cmdlet is run. If the Disk parameter isn't specified, storage tests run on all disks that are available for use in the cluster or that are in the cluster resource offline or failed state.
The acceptable values for this parameter are:
- Int32, Int64, Uint32, or Uint64. A number that represents a master boot record (MBR) signature of the disk.
- System.String. A string that represents a master boot record (MBR) signature of the disk, hexadecimal format is supported.
- System.String. A string that represents the GUID of a GPT disk.
- ClusterResource. A cluster resource object that represents a clustered disk.
- CimInstance#MSFT_Disk. An object returned from
Get-Disk
, from the Windows PowerShell storage module.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Runs the cmdlet without prompting for confirmation. By default the cmdlet will ask for confirmation from the user before proceeding. When combined with the Disk or Pool parameters, the disks or storage pool is taken offline for the duration of the storage tests.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies which tests or category of tests to ignore during the validation test run. All other tests or category of tests will run.
Type: StringCollection
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies which tests or category of tests to include during the validation test run. Only the tests or category of tests specified here will run.
Type: StringCollection
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the cluster on which to run the validation tests.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Causes the cmdlet to list the tests and test categories. No tests will run on the servers or cluster nodes.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a comma-separated list of server names on which to run the cluster validation tests.
Type: StringCollection
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the clustered storage pool or pools for which to run the cmdlet. When the specified storage pool is online and a virtual disk in the storage pool is assigned to a clustered role or Cluster Shared Volume, you must also specify the Force parameter to take the storage pool offline for the duration of the storage tests. Otherwise, command will exit with an error. The specified storage pool must be taken offline before running the storage tests. If the Pool parameter isn't specified, storage tests run on all storage pools that are available for use in the cluster or that are in the cluster resource offline or failed state.
The acceptable values for this parameter are:
- System.String: A string that represents the name of the clustered storage pool or pools.
- ClusterResource: A cluster resource object that represents a clustered storage pool.
- CimInstance#MSFT_StoragePool: An object returned from
Get-StoragePool
, from the Windows PowerShell storage module.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the test report to generate.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.