Wu's Blog

Wu's Blog

My IT Adventure

How To Get Used Space By PowerShell

Written by

Wu Zheng

in

English

I searched internet but hard to find an easy way to get used space on Windows Server.

Following is two lines PowerShell command to get used space on  Windows 2012 R2 Server.

Get-WmiObject win32_logicaldisk | select deviceid,@{n="Size";e={[math]::Round(($_.size/1GB),2)}},@{n="Used Space";e={[math]::Round((($_.Size-$_.FreeSpace)/1GB),2)}}

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on LinkedIn (Opens in new window) LinkedIn
←Offline Installer of IT Pro Tools
Virtual Machine Cloning Is Failed At 33%→

More posts

  • Fixing “Keyset Does Not Exist” When Adding a Node to a Windows Server Failover Cluster

    March 26, 2026
  • Visual Studio Code Could Not Resolve Python Interpreter Path

    March 22, 2026
  • Failed to run PowerCLI command

    December 5, 2025
  • Headset Mute Button is Not Sync with Microsoft Teams

    November 6, 2025

Search


Tags

Ansible Apple Automation Azure DevOps Hardware hyper-v IaaS IaC Image Life Microsoft network notes PowerCLI PowerShell Proxy public cloud Python raspberry pi Script security Server Terraform vCenter virtualization VMware VPN Windows Windows Server

Twenty Twenty-Five

Designed with WordPress