Created
February 23, 2017 19:50
-
-
Save Xainey/699c4fa5790f0eedc57571adf1dfc84f to your computer and use it in GitHub Desktop.
Quick and dirty view
This file contains 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
function space($pc) | |
{ | |
Get-WmiObject Win32_LogicalDisk -ComputerName $pc | | |
Where-Object {$_.DriveType -eq 3} | | |
Select-Object DeviceID, VolumeName, ` | |
@{n="Size"; e={[math]::round($_.Size / 1GB, 1)}}, ` | |
@{n="FreeSpace"; e={[math]::round($_.FreeSpace / 1GB, 1)}}, ` | |
@{n="PercentFree"; e={[math]::round($_.FreeSpace / $_.Size * 100.0, 1)}} | | |
Format-Table | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment