Param($PoolName) if ((Get-Service -Name ClusSvc -ErrorAction SilentlyContinue).Status -ne "Running") { return 9999 exit } if($PoolName -eq $null) { $PoolName = "S2D*" } $storpool = (Get-StoragePool -FriendlyName $PoolName) return (($storpool.Size - $storpool.AllocatedSize)/$storpool.Size * 100)