Answer the question
In order to leave comments, you need to log in
How to find out how full the disk space is in Windows Server 2012 R2 RU?
How to find out how full the disk space is in Windows Server 2012 R2 RU?
Answer the question
In order to leave comments, you need to log in
$TotalGB = @{Name="Capacity(GB)";expression={[math]::round(($_.Capacity/ 1073741824),2)}}
$FreeGB = @{Name="FreeSpace(GB)";expression={[math]::round(($_.FreeSpace / 1073741824),2)}}
$FreePerc = @{Name="Free(%)";expression={[math]::round(((($_.FreeSpace / 1073741824)/($_.Capacity / 1073741824)) * 100),0)}}
function get-mountpoints {
$volumes = Get-WmiObject win32_volume -Filter "DriveType='3'" -computername my-server
$volumes | Select Name, Label, DriveLetter, FileSystem, $TotalGB, $FreeGB, $FreePerc | Format-Table -AutoSize
}
get-mountpoints
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question