VMware VSAN PowerCLi module


With the PowerCLi 6.5.1 release, the new Get-VsanView cmdlet is now available that exposes the complete VMware VSAN Management API.

The famous VMware guru William Lam demonstrated the great proof of concept for managing and silencing VSAN Health Checks.

After reading this article, I decided to create VSAN PowerCLi module.

You can download it (and many other resources) from my GitHub PowerCLi repo.

Today I want to introduce you release that already contains nine functions to deal with VSAN Health Check aspects.

Get-Command –Module VSAN


The only requirement for all the functions is PowerCLi 6.5.1 and VSAN API 6.6. You can check these prerequisites by Get-VSANVersion function, that included in the module and Get-Version from another my module.


Get-Cluster | Get-VSANVersion
Get-Version -VCenter


Disable-VSANHealthCheck /


The first function pair is:

Disable-VSANHealthCheck and Enable-VSANHealthCheckSkipped.

These functions allow to disable or silence a currently active Health Check(s) or enable previously skipped Health Check(s).

Get-VSANHealthCheckSupported | Disable-VSANHealthCheck (Get-Cluster)


Get-Cluster | Get-VSANHealthCheckSkipped | Enable-VSANHealthCheckSkipped


Get-VSANHealthCheckSupported /


As you can see there are two helper functions:

Get-VSANHealthCheckSupported and Get-VSANHealthCheckSkipped. There is possible to pipeline their output to the Disable-VSANHealthCheck and Enable-VSANHealthCheckSkipped functions respectively.

The Get-VSANHealthCheckSupported function has not any mandatory parameters and may be executed with no one parameter.



As well the PowerShell Intellisense autocomplete can be used.

Get-VSANHealthCheckSupported cloudhealth,hcl,perfsvc



All Tests (supported Health Checks) are organized in groups. The Get-VSANHealthCheckGroup function will return all of them.




The Get-VSANHealthSummary function can get overall VSAN Cluster health summary. It can retrieve the last test results from the cache (-FetchFromCache switch parameter) or execute checks right now. The Timestamp property will show you the test execution time.

Get-Cluster | Get-VSANHealthSummary -FetchFromCache


The Get-VSANHealthSummary supports one more parameter -SummaryLevel. The Strict level will show you additional warnings. You may quietly ignore them, but it would be nice to be notified about them.

Get-Cluster | Get-VSANHealthSummary -SummaryLevel Strict -Verbose



The Invoke-VSANHealthCheck function executes “Retest” button action (Hosts and Clusters view -> Monitor tab -> vSAN category -> Health menu -> Retest button)


Get-Cluster | Invoke-VSANHealthCheck
Get-Cluster | Invoke-VSANHealthCheck -HideGreen
Get-Cluster | Invoke-VSANHealthCheck –Level Test


With -HideGreen switch you can filter out Green and Skipped Health Checks.

The -Level parameter manages Health Checks view level.

The default is Group level.


But there is option to drill down to each Health Checks group to view in Test level.



The idea for Get-VSANSmartData function taken from VSANSmartsData.ps1 script written by William Lam.

Get-Cluster | Get-VSANSmartData

I could not test it, because I have not SMART capable drives in my LAB. If you will be able to check it, please write in the comments.


  • Most functions in the module are advanced functions and support -Confirm and -Verbose parameters.
Get-VSANHealthCheckSkipped -Cluster (Get-Cluster VSAN-Cluster) -Verbose
Get-VSANHealthCheckSupported | Disable-VSANHealthCheck (Get-Cluster) -Confirm:$false –Verbose
  • Wherever possible a pipeline is supported.
Get-Cluster | Get-VSANHealthCheckSkipped
Get-VSANHealthCheckSupported | Disable-VSANHealthCheck (Get-Cluster)
Get-Cluster VSAN-Cluster | Get-VSANHealthCheckSkipped | Enable-VSANHealthCheckSkipped
  • For more details about each function, please take a look at the content based help and examples.
Get-Help Get-VSANHealthSummary -Examples
Get-Help Disable-VSANHealthCheck –Full
Get-Help Get-VSANHealthCheckSkipped –Parameter VsanCluster

You may also like:

VMware VAMI PowerCLi module

5 thoughts on “VMware VSAN PowerCLi module

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s