rying to get my datastore info and naaid plus freesapce and capacity gb
but I am not sure how to round off the freespacegb
get-datastore -server vc | select Name, @{N="naaid";E={$_.extensiondata.info.vmfs.extent.diskname}{, FreespaceGb, capaictyGB
Freespacegb is showing like this 4092.6474609375
i want to round it off to 4092.64
Try like this
Get-Datastore -Server vc |
select Name,
@{N="naaid";E={$_.extensiondata.info.vmfs.extent.diskname}},
@{N='FreespaceGb';E={[math]::Round($_.FreespaceGB,2)}},
@{N='CapacityGB';E={[math]::Round($_.CapacityGB,2)}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
Get-Datastore -Server vc |
select Name,
@{N="naaid";E={$_.extensiondata.info.vmfs.extent.diskname}},
@{N='FreespaceGb';E={[math]::Round($_.FreespaceGB,2)}},
@{N='CapacityGB';E={[math]::Round($_.CapacityGB,2)}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks