← UniTech LK Windows Fix Guides
PowerShell Storage Analysis Guide

PowerShell Storage Analysis: Find What Is Using Disk Space on Windows 11

Use built-in PowerShell commands to identify large files and folders, investigate C drive storage usage, analyze WinSxS and understand what may be consuming disk space on Windows 11.

Published: August 12, 2026

What This Guide Covers

If your Windows 11 C drive is unexpectedly full, the first step should be to identify what is actually consuming the storage before deleting anything.

PowerShell gives Windows administrators and advanced users a direct way to inspect disk usage without installing third-party disk-analysis software.

1. Check C Drive Free Space

Start by checking the total, used and available storage on the Windows system drive.

Get-PSDrive C

Review the Used and Free values to confirm whether the C drive is actually running low on disk space.

2. Find the Largest Folders with PowerShell

Large folders are often responsible for unexpected C drive usage. Common locations include user profiles, application data, Windows component storage and application caches.

Get-ChildItem C:\ -Directory -Force -ErrorAction SilentlyContinue | ForEach-Object { $size = ( Get-ChildItem $_.FullName -File -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object Length -Sum ).Sum [PSCustomObject]@{ Folder = $_.FullName SizeGB = [math]::Round($size / 1GB, 2) } } | Sort-Object SizeGB -Descending | Select-Object -First 20

This calculates folder sizes and lists the largest folders first. Depending on the amount of data stored on the computer, the scan can take some time.

3. Find the Largest Files with PowerShell

Individual files can sometimes consume many gigabytes without being obvious in File Explorer.

Get-ChildItem C:\ -File -Recurse -Force -ErrorAction SilentlyContinue | Sort-Object Length -Descending | Select-Object -First 20 FullName, @{Name="SizeGB";Expression={[math]::Round($_.Length / 1GB, 2)}}

Always check the complete file path before deleting anything.

Large Windows system files, databases, installer files or application files should not automatically be deleted simply because they are large.

4. CapabilityAccessManager.db-wal Storage Example

During Windows storage analysis, you may find a file named CapabilityAccessManager.db-wal using an unusually large amount of disk space.

This Windows-related database write-ahead log should not be treated like an ordinary temporary file.

Investigate why the file became large before attempting cleanup.

Important

Do not manually delete Windows database files simply because a PowerShell storage scan reports that they are large.

First identify the Windows component using the file and follow the appropriate troubleshooting procedure.

CapabilityAccessManager.db-wal Fix

5. Analyze the Windows WinSxS Component Store

The WinSxS directory is part of the Windows component store.

File Explorer can make this directory appear larger than the amount of disk space that can actually be reclaimed.

Use DISM to perform the proper Windows component-store analysis.

DISM /Online /Cleanup-Image /AnalyzeComponentStore

DISM reports the actual component-store information and indicates whether component-store cleanup is recommended.

6. Safely Clean WinSxS with DISM

If Windows reports that component-store cleanup is recommended, use the supported DISM cleanup command.

DISM /Online /Cleanup-Image /StartComponentCleanup

This uses Microsoft's servicing mechanism to remove superseded Windows components safely.

Do Not Manually Delete WinSxS

Never manually delete files from C:\Windows\WinSxS.

Manual deletion can damage Windows Update, system servicing and Windows recovery.

Recommended Storage Troubleshooting Order

  1. Check available C drive space.
  2. Find the largest folders.
  3. Find the largest individual files.
  4. Investigate unusually large databases, logs or application files.
  5. Analyze the WinSxS component store using DISM.
  6. Perform supported cleanup only when appropriate.
  7. Restart Windows and check available storage again.

Important Storage Cleanup Safety

Storage-analysis commands help identify large files and folders, but a large file is not automatically safe to delete.

Be especially careful with items located inside:

When unsure, determine what created the file before removing it.

Frequently Asked Questions

How do I find what is using disk space on Windows 11?

PowerShell can list and sort large files and folders so you can identify exactly where storage is being consumed.

Can PowerShell find the largest files on my C drive?

Yes. Get-ChildItem can recursively scan the drive while Sort-Object arranges files by size so the largest items appear first.

Why is my Windows 11 C drive suddenly full?

Common causes include application caches, user profile data, Windows updates, component-store files, temporary data and unexpectedly large database or log files.

Can I delete the WinSxS folder?

No. Do not manually delete WinSxS files. Use DISM's supported component-store analysis and cleanup commands.

What if CapabilityAccessManager.db-wal is very large?

Investigate the Windows component creating the file before deleting anything.

UniTech LK has a separate troubleshooting guide dedicated to unusually large CapabilityAccessManager.db-wal files.

Related UniTech LK Troubleshooting Guides

Watch the Full PowerShell Storage Analysis Video

Follow the complete demonstration on YouTube to see the PowerShell storage-analysis commands and Windows disk-space results step by step.

Watch on YouTube
← Back to UniTech LK Troubleshooting Guides