Export (0) Print
Expand All
Expand Minimize

Test-Cluster

Windows Server 2012 R2 and Windows 8.1

Test-Cluster

Runs validation tests for failover cluster hardware and settings.

Syntax

Parameter Set: InputObject
Test-Cluster [[-Node] <StringCollection> ] [-Cluster <String> ] [-Disk <Object[]> ] [-Force] [-Ignore <StringCollection> ] [-Include <StringCollection> ] [-InputObject <PSObject> ] [-List] [-Pool <Object[]> ] [-ReportName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

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.

Parameters

-Cluster<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Disk<Object[]>

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 is not 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, 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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Runs the cmdlet without prompting for confirmation. By default the cmdlet will ask for confirmation from the user before proceeding.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Ignore<StringCollection>

Specifies which tests or category of tests to ignore during the validation test run. All others tests or category of tests will run.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Include<StringCollection>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<PSObject>

Specifies the cluster on which to run the validation tests.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-List

Causes the cmdlet to list the tests and test categories. No tests will run on the servers or cluster nodes.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Node<StringCollection>

Specifies a comma-separated list of server names on which to run the cluster validation tests.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Pool<Object[]>

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, the specified storage pool must be taken offline before the storage tests. If the Pool parameter is not 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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ReportName<String>

Specifies the name of the test report to generate.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.FailoverClusters.PowerShell.Cluster

Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.IO.FileInfo
  • Microsoft.FailoverClusters.PowerShell.ClusterTestInfo

Examples

Example 1

This example runs all applicable cluster validation tests on the local cluster.


PS C:\> Test-Cluster

Example 2

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.


PS C:\> Test-Cluster -Node node1,node2

Example 3

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.


PS C:\> Test-Cluster -List

Example 4

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.


PS C:\> Test-Cluster -Node node1,node2 -Include Storage

Example 5

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.


PS C:\> Test-Cluster -Node node1,node2 -Ignore Inventory

Example 6

This example runs the test called List Potential Cluster Disks on the local cluster.


PS C:\> Test-Cluster -Include "List Potential Cluster Disks"

Example 7

This example runs the tests called List System Drivers and List Unsigned Drivers on the local cluster.


PS C:\> Test-Cluster -Include "List System Drivers","List Unsigned Drivers"

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft