How the Test-StorageHealth.ps1 script checks for Storage Cluster health

I recently published the Test-StorageHealth.ps1 script to the TechNet Script Center, which checks for the health and capacity of a Storage Cluster based on Windows Server 2012 R2 Scale-Out File Servers. This blog post explains the portion of the script that checks for Storage Cluster health, which is labeled “Phase 1”.

To assess health, the script basically looks at the few objects using PowerShell, making sure they are being reported as healthy. That includes a few cluster objects (nodes, networks, resources, CSV volumes) and some storage objects (volumes, virtual disks, storage pools, physical disks, enclosures). The script also checks related items like deduplicated volumes, continuously available SMB file shares, SMB open files and SMB witness connections. The script also checks a minimum number of items (4 enclosures, 240 physical disks, 3 pools, etc.) which you will likely have to adjust for your specific configuration.

Here’s a table of the objects, the properties that indicate health and the number of expected items included by default in the current version of the script (version 1.5):

Object PowerShell cmdlet Health Check Expected
Cluster Nodes Get-ClusterNode State –eq “Up” 4
Cluster Networks Get-ClusterNetwork State –eq “Up” 2
Cluster Resources Get-ClusterResource State –eq “Online”  
Cluster Shared Volumes Get-ClusterSharedVolume State –eq “Online”  
Volumes Get-Volume HealthStatus –eq “Healthy” 33
Deduplicated Volumes Get-DedupStatus LastOptimizationResult –eq 0 16
Virtual Disks Get-VirtualDisk HealthStatus –eq “Healthy”  
Storage Pools Get-StoragePool HealthStatus –eq “Healthy” 3
Physical Disks Get-PhysicalDisk HealthStatus –eq “Healthy” 240
Storage Enclosures Get-StorageEnclosure HealthStatus –eq “Healthy” 4
SMB Shares Get-SmbShare Test-Path(SharePath)  
SMB Open Files Get-SmbOpenFile   >0
SMB Witness Get-SmbWitnessClient   >0

It’s also important to note that, in general, the script looks at cluster objects and objects related to the scale-out file server, skipping local items. Here are a few examples:

  • When checking storage objects, it filters for objects in the Cluster Storage Subsystem
  • When checking volumes, it filters for volumes with the CSVFS File System
  • When check SMB shares, it filter for those marked as continuously available

I hope you find the script and this blog post useful. You can use it directly, adjust a few items for your configuration or just use it as a starting point for creating your own custom script. You can download the script from the TechNet Script Center at

Comments (6)

  1. hassan sayed issa20014 says:


  2. JoseBarreto says:

    I have relayed your suggestion to a PM in the SCOM team. Thanks!

  3. hassan sayed issa20014 says:


  4. Hi Jose,
    Can of these health checks be implemented in File Server Management Pack for SCOM?

  5. Anonymous says:

    I just published a PowerShell script to check the health and capacity of a Storage Cluster based on Windows Server 2012 R2 Scale-Out File Servers.