Finding what fills a Windows drive with a read-only PowerShell audit
Windows Settings offers storage cleanup recommendations, but they don't show where space went in a scriptable way. The article proposes a PowerShell approach in two parts: a read-only audit that reports free space per drive, the largest profile folders, and the size of common junk locations. The cleanup part is narrow, deleting only week-old files from the user's TEMP folder, and supports -WhatIf previews and refuses to run if TEMP looks wrong. Other locations such as Downloads, the Recycle Bin, the Windows Update cache, and Windows.old are only measured, leaving decisions to the user. The author notes the code has been syntax-checked and tested with simulated drives but not yet run on Windows 11 or PowerShell 5.1, so readers should review it and try -WhatIf first.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in