## PowerCLI Reference

# Test-VsanClusterHealth

## Synopsis

This cmdlet runs a health test on the specified vSAN clusters and returns the test results.

Syntax

Test-VsanClusterHealth [-Cluster] <Cluster[]> [-UseCache] [-VMCreateTimeoutSeconds <Int32>] [-TestResultFilter <VsanClusterHealthResultFilter[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet runs a health test on the specified vSAN clusters and returns the test results.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Cluster | Cluster[] | Specifies the clusters on which you want to run a vSAN health test. | true | true (ByValue)
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false
TestResultFilter | VsanClusterHealthResultFilter[] | Specifies a subset of health test results. Only the specified test result fields are returned. | false | false
UseCache | SwitchParameter | Indicates to return the result directly from cache instead of running the full health check. The cache is updated periodically and keeps the latest vSAN health summary check result, either triggered from a user on-demand request or the periodical vSAN health check for triggering a health event or alarm. | false | false
VMCreateTimeoutSeconds | Int32 | Specifies the timeout to run virtual machine creation tests in seconds. The default value is 120. | false | false

Return Type

VsanClusterHealthTestResult objects representing the result of the test run

Notes

Examples

-------------- Example 1 --------------

    Test-VsanClusterHealth -Cluster $cluster

Runs the vSAN cluster health test on $cluster vSAN cluster and returns the result of the test.

-------------- Example 2 --------------

    Test-VsanVMCreation -Cluster $cluster -UseCache -TestResultFilter NetworkHealth, DiskBalance

Gets the result of the last health test run on $cluster vSAN cluster. Returns test result fields for network health and disk balance.

Copyright © VMware, Inc. All rights reserved.