PowerShell – Show Disk Space

This cmdlet gets all the Local Disks on a computer, selects only the Drive Letter (eg C:), Volume Name (eg OS), Size and Freespace. It converts the Size and Freespace to GB.

0 – Unknown
1 – No Root Directory
2 – Removable Disk
3 – Local Disk
4 – Network Drive
5 – Compact Disc
6 – RAM Disk