A
A
AlinaHeldman2020-12-24 17:33:16
Windows Server
AlinaHeldman, 2020-12-24 17:33:16

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

1 answer(s)
A
Andrey Ivanov, 2020-12-24
@rus0nix

$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

I use this script found on the internet to display information about free disk space on a remote server. Shows, among other things, drives that are mounted as folders. Substitute only your server name for my-server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question