I modified it
# Get only DS where free space is below X%
$freeWatermarkPercent = 5
# Get DS where actual free space is only 100 GB or less
$freeWatermarkGB = 100
# Get DS where OverCommit (prov ) % is above twice
$overcommit = 1.5
Get-view -ViewType Datastore -Property Name,Summary -Filter @{'Summary.Type'='NFS'} |
where{($_.Summary.FreeSpace/$_.Summary.Capacity)*100 -lt $freeWatermarkPercent -or
($_.Summary.Capacity - $_.Summary.FreeSpace + $_.Summary.Uncommitted)/$_.Summary.Capacity -gt $overcommit -or
($_.Summary.FreeSpace/1GB) -le $freeWatermarkGB} |
Select-Object name,
@{N="Capacity (GB)"; E={[math]::round($_.Summary.Capacity/1GB,2)}},
@{N="FreeSpace (GB)"; E={[math]::round($_.Summary.FreeSpace/1GB,2)}},
@{N="Provisioned (GB)"; E={[math]::round(($_.Summary.Capacity - $_.Summary.FreeSpace + $_.Summary.Uncommitted)/1GB,2) }}
And made it or & then the o/p does not suggest which of the 3 case it hit... how this problem is fixed ?