Last active
August 29, 2015 14:21
-
-
Save bklockwood/64c171ece8b6a61fbb82 to your computer and use it in GitHub Desktop.
Return disk space and freespace as GB, rounded to 2 decimal places, in powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> Get-CimInstance win32_logicaldisk | foreach-object {write "$($_.caption) $([math]::round(($_.size /1gb),2)), $([math]::round(($_.FreeSpace /1gb),2)) "} | |
C: 117.99, 21.12 | |
D: 59.45, 9.48 | |
E: 0, 0 | |
F: 1863.02, 830.57 | |
G: 7.6, 0.22 | |
Y: 1862.89, 1409.86 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment