Test-VsanClusterHealth Command | Vmware PowerCLI Reference


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


-Cluster < Cluster[] >
[-Perspective < VsanHealthPerspectiveType > ]
[-Server < VIServer[] > ]
[-TestResultFilter < VsanClusterHealthResultFilter[] > ]
[-UseCache ]
[-VMCreateTimeoutSeconds < Int32 > ]


Required Parameter Name Type Position Features Description
Cluster Cluster[] named
  • pipeline
  • wildcards
Specifies the clusters on which you want to run a vSAN health test.
optional Perspective VsanHealthPerspectiveType named
Specifies the health check perspective. This parameter declares the perspective of the vSAN health check depending on its purpose. For example, you can do a customized health check before running a vSAN cluster power-off by using ClusterPowerOffPrecheck as the parameter value. You can use this parameter starting from vSAN 7.0 Update 3.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
optional TestResultFilter VsanClusterHealthResultFilter[] named
Specifies a subset of health test results. Only the specified test result fields are returned.
optional UseCache SwitchParameter named
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.
optional VMCreateTimeoutSeconds Int32 named
Specifies the timeout to run virtual machine creation tests in seconds. The default value is 120.




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-VsanClusterHealth -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.

Example 3

Test-VsanClusterHealth -Cluster $cluster -Perspective "clusterPowerOffPrecheck"

Runs a health test on the specified vSAN cluster for the purposes of a precheck before powering off a vSAN cluster.

Related Commands


This cmdlet executes vSAN cluster power on.

This cmdlet powers off a vSAN cluster.


This cmdlet retrieves vSAN related configuration data from clusters.

This cmdlet modifies vSAN configuration settings for a cluster.


This cmdlet starts the update of all vSAN disks of a cluster to the latest vSAN disk format version supported by the cluster.


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


This cmdlets retrieves the power state of a vSAN cluster.


This cmdlet starts the proactive rebalance of the vSAN objects on the cluster hosts based on the vSAN disks usage when the disks are in imbalanced state.

This cmdlet stops the proactive rebalance of the vSAN objects on the cluster hosts.