Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Used Disk Space

$
0
0

Hi Masters,

I would like to get "remotely" more servers Disk infos as: Diskname,WholeDiskSize,FreeSpace,UsedDiskSpace.

What I have done until now:

function Get-FreeSpace {
gwmi win32_volume -Filter 'drivetype = 3' | select driveletter, label, @{LABEL='GBfreespace';EXPRESSION={"{0:N2}" -f ($_.freespace/1GB)} }
}
function Get-DiskSize {
gwmi win32_volume -Filter 'drivetype = 3' | select driveletter, label, @{LABEL='GBcapacity';EXPRESSION={"{0:N2}" -f ($_.capacity/1GB)} }
}

Any idea would be appreciated

Thanks


Viewing all articles
Browse latest Browse all 6937

Trending Articles