How to Check Disk Space Using PowerShell in Windows 11
Checking available disk space from PowerShell shows how much room remains on your drives, useful for monitoring storage or in maintenance scripts. Windows 11 reports drive capacity and free space cleanly through YYGACOR Resmi PowerShell.
The Command
Get-PSDrive -PSProvider FileSystem | Select-Object Name, @{n='FreeGB';e={[math]::Round($_.Free/1GB,2)}}, @{n='UsedGB';e={[math]::Round($_.Used/1GB,2)}}
What It Does
This lists your file system drives and calculates free and used space in gigabytes, rounded to two decimals. The parts in braces convert the raw byte values to gigabytes for readability. The result is a clear table showing each drive letter with its free and used space, giving an at-a-glance view of storage.
When You’d Use This
This helps when monitoring storage, checking free space before a large download or installation, or reporting drive capacity in a maintenance script. Seeing free and used space per drive at a glance is more convenient than opening File Explorer’s properties for each drive, and the gigabyte formatting makes the figures immediately readable rather than raw byte counts.
Useful Variations
For a simpler view, `Get-PSDrive -PSProvider FileSystem` alone shows free and used space in bytes. Using `Get-Volume` presents drives with size and free space and their labels in a tidy format. To check one drive, filter by its letter, such as adding `-Name C` to focus on the C drive.
If It Doesn’t Work
If the formatted command seems complex, the simpler `Get-Volume` gives a clean, readable overview of all drives with their free space and labels. If a drive is missing, it may be disconnected or unmounted. Remember the detailed version converts bytes to gigabytes for readability, so if you see huge raw numbers, you are likely using a simpler form without the conversion applied.
Good to Know
The gigabyte conversion makes the output far easier to read than raw bytes, which is why the calculation is included. `Get-Volume` is often the simplest command for a quick, readable overview of all drives, while the detailed version here is useful when you want precise, formatted free-space figures in scripts.
Putting It Together
The command shown may look dense at first, but it breaks down into clear parts once you have used it a few times. As part of gathering facts about your hardware and Windows setup, this command saves you from digging through settings screens. Together with the others in this area, it lets you document a system’s full configuration or answer a specific specification question in seconds from the terminal. Like anything in the terminal, the real value comes from trying it on your own system and adapting the variations above to what you actually need, so it is worth experimenting with in a safe, low-stakes situation before relying on it in a script or during troubleshooting. Keeping a note of the commands you find most useful, along with the variations that fit your workflow, turns scattered one-off tricks into a personal reference you can draw on whenever a similar task comes up again.