PowerShell Folder Size Reporter with Top-N Largest Folders
Finding where disk space went requires a fast recursive folder-size script. This guide builds one that handles deep trees, skips reparse points, and ranks folders by size clearly.
Commands Tips
Finding where disk space went requires a fast recursive folder-size script. This guide builds one that handles deep trees, skips reparse points, and ranks folders by size clearly.
Explicit ACEs and broken inheritance create permission sprawl that no one audits until an incident. This script scans a share, flags breaks, and exports a risk-ranked report.
Compress-Archive handles ZIP natively but 7-Zip supports more formats and better compression. Learn when to use each in your automation scripts.
Get-Item retrieves a specific item while Get-ChildItem lists contents. Learn the key differences and when to use each across files, registry, and env vars.
Robocopy is the professional file copy tool for PowerShell scripts. Learn retry logic, multithreaded copies, exclusions, and log file integration.
Count lines, words, and characters in files with PowerShell. Learn Get-Content with Measure-Object and efficient counting for large files.
Get-FileHash computes cryptographic hashes to verify file integrity. Learn to generate SHA256 hashes, compare files, and validate downloads.
PowerShell’s built-in archive cmdlets handle ZIP compression without 7-zip. Learn Compress-Archive, Expand-Archive, and common archive patterns.
Both New-Item and mkdir create folders in PowerShell. Learn which is more powerful, when to use each, and how to create nested directories at once.
Get-Content reads raw lines while Import-Csv creates structured objects. Learn which to choose based on your file format and downstream processing needs.