I'm using VMWare's PowerCLI to run this command to output an inventory of sorts from vCenter.
Get-VM | Select-Object Name,MemoryGB,NumCpu,UsedSpaceGB,@{n="TotalHDSizeGB"; e={(Get-HardDisk -VM $_ |Measure-Object -Sum CapacityGB).Sum}},@n="Network"; e={(Get-NetworkAdapter -VM $_ |Select -unique -expand NetworkName)}}Sort-Object Network|Export-Csv -Path vms.csv
I'd like to round the UsedSpaceGB and list all of the NetworkName values, not just one. I've seen how to use [Math]::Round() to round numbers in scripts, but I haven't been able to find an example on the command line and my attempts have failed to accomplish the desired results. How do I do that?