Hi All,
Can we pull the report for the lists of Datastore having crossed the threshold of 85 % or reached the threshold 85%. ? Also, want to know the free space left in the data store.
E.g Total capacity (TB) and free space left ( TB)
Thanks
vmk
Sure, try like this
where {$_.FreeSpaceGB / $_.CapacityGB -le .25} |
Select -Property Name,CapacityGB,FreeSpaceGB,
@{N='FreeSpace%';E={"{0:P}" -f ($_.FreeSpaceGB / $_.CapacityGB)}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
where {$_.FreeSpaceGB / $_.CapacityGB -le .25}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can we add % free space also?
Sure, try like this
where {$_.FreeSpaceGB / $_.CapacityGB -le .25} |
Select -Property Name,CapacityGB,FreeSpaceGB,
@{N='FreeSpace%';E={"{0:P}" -f ($_.FreeSpaceGB / $_.CapacityGB)}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
Can we get Cluster name also in the report ?
Thanks
vmk
Try like this
where {$_.FreeSpaceGB / $_.CapacityGB -le .25} |
Select -Property Name, CapacityGB, FreeSpaceGB,
@{N = 'FreeSpace%'; E = {"{0:P}" -f ($_.FreeSpaceGB / $_.CapacityGB)}},
@{N = 'Cluster'; E = {(Get-VMHost -Datastore $_ | Get-Cluster).Name}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you LucD.