I am using the following command to check space on remote server:
Get-WmiObject -Class win32_logicalDisk -ComputerName computer-name | Select Name,@{n="Free";e={[math]::trun
cate($_.freespace / 1GB)}}, @{n="Total Size";e={[math]::truncate($_.size / 1GB)}}
It outputs:
Name Free Total Size
---- ---- ----------
C: 13 59
D: 0 0
However, the actual space is: 10.5 free from 59.8. It's like it's using int, not float. Anyone know how can I change it in order to show the real float values?