What if Optimize-StoragePool doesn’t work with the “-WhatIf” switch?

Just recently I was running optimization job on S2D pool, so lead by curiosity I wanted to start it with the “-whatif” witch, like this:

$UniqueId = (Get-StoragePool | Where {$_.IsPrimordial -eq $false}).UniqueId
Optimize-StoragePool -UniqueId $UniqueId -whatif

I have found it on this wonderful blog:
http://www.darrylvanderpeijl.com/storage-spaces-direct-needs-rebalance/

And guess what? It started to do the job…

So be aware about that once “testing” the Optimize-StoragePool cmdlet.

Advertisements