Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
13 views
in PowerShell by 12 13 22
I need to monitor the available and used disk space for all drives on a Windows server. How can I achieve this using PowerShell?

1 Answer

0 like 0 dislike
by 164 208 428

How to Check the Disk Space of All Drives on a Windows Using PowerShell?

You can use the Get-PSDrive cmdlet in PowerShell to check the disk space of all logical drives on a Windows server.

Get-PSDrive -PSProvider FileSystem | Select-Object Name, @{Name="UsedGB";Expression={[math]::round(($_.Used/1GB),2)}}, @{Name="FreeGB";Expression={[math]::round(($_.Free/1GB),2)}}, @{Name="TotalGB";Expression={[math]::round(($_.Used + $_.Free)/1GB,2)}}

Output

Get Security Updates Installed in Last Month in PowerShell

If you don’t ask, the answer is always NO!
...