A simple cmdlet that returns information about the local drives
PS> Get-DriveInfo
VolumeLabel Name UsedSpace FreeSpace TotalSize %Free
----------- ---- --------- --------- --------- -----
Local Disk C:\ 57,026,994,176 114,771,693,568 160 GB 67 %
Local Disk D:\ 11,427,856,384 66,725,654,528 72.786 GB 85 %
Local Disk G:\ 759,332,864 1,337,524,224 1.953 GB 64 %
Compare it with Get-PSDrive in PowerShell v2
PS> Get-PSDrive | where {$_.Name -like "?"} | ft -a
Name Used (GB) Free (GB) Provider Root CurrentLocation
---- --------- --------- -------- ---- ---------------
C 53.11 106.89 FileSystem C:\ scripts
D 10.64 62.14 FileSystem D:\
E FileSystem E:\
F FileSystem F:\
G .71 1.25 FileSystem G:\
The used and free information wasn’t available in PowerShell v1
Technorati Tags:
PowerShell,
PSCX,
disks