Daniel's Tech Blog

Cloud Computing, Cloud Native & Kubernetes

SCVMM – Storage Overcommitment PowerShell Script – Version 3.2

Nearly 1000 downloads got my CSV Overcommitment PowerShell script on the TechNet Gallery and again it was time to invest some hours into it.

-> https://gallery.technet.microsoft.com/Discover-Cluster-Shared-859f133c

My main focus was to add support for SMB 3.0 file shares which are managed by VMM. Till version 3.1 the script supported only Cluster Shared Volumes and not SMB 3.0 file shares that become more and more popular through Scale-Out File Server deployments.

During my tests I discovered a very odd situation. When you are using differencing disks, for example the WAP VM role gallery items, and you deleted the base disk on your storage VMM does not customize its database entries. The result was that my script has taken those dead bodies into the overcommitment calculation and that ended up in an inaccuracy of the calculation.


To get all the disks out of the VMM database I’m using the following line in my script.

Get-SCVirtualHardDisk -All -VMMServer $VMMServer|Sort-Object -Property Location –Unique

So I’m getting also the dead bodies. What now? I fixed this in version 3.2 with an additional test if the disk exists on the storage. But the runtime suffers under the additional testing and that is the reason why the additional testing is optional. You can call the PowerShell function either without the switch –Testing for runtime performance or with the switch –Testing for a better accuracy.

  1. Get-SCStorageOvercommitment –VMMServer localhost
  2. Get-SCStorageOvercommitment –VMMServer localhost –Testing


You can see the difference in the screenshots above and as you may have discovered I have done minor output changes. I have added two additional columns for the storage type and the additional testing.

After all I’m in the planning phase for version 4.0. Focus is on transferring the current script to a SMA runbook with daily email status reports. Stay tuned!


Version Changes
  • Added support for SMB 3.0 file shares managed by VMM
  • Added advanced testing mode for a better accuracy
  • Minor output changes
  • Added support for multiple Hyper-V clusters with the same CSV names
  • Added support for Shared VHDX
  • Performance improvements
  • Support for CSV paths from C:ClusterStorageVolume10 and up
  • Support for VMs whose VHDs resides on different CSVs
  • Completely based on the VMM PowerShell Cmdlets
1.0 Initial release
WordPress Cookie Notice by Real Cookie Banner