Technical Thursdays: Calculate Directory Sizes Stupidly Fast With PowerShell.
Reading Time: Approximately 7 minutes.
Scenario
A file share that a group in your business is dependent on is running out of space. As usual, they have no idea why they’re running out of space, but they need you, the sysadmin, to fix it, and they need it done yesterday.
This has been really easy for Linux admins for a long time now: Do this
du -h / | sort -nr
and delete folders or files from folders at the top that look like they want to be deleted.
Windows admins haven’t been so lucky…at least those that wanted to do it on the command-line (which is becoming increasingly important as Microsoft focuses more on promoting Windows Server Core and PowerShell). `
… »