Short posts about Microsoft PowerShell as I learn, trying to focus on one aspect at a time.
Tuesday, June 30, 2009
Recursively Getting All Folder Sizes
This started out as my entry for Event 8 in the Microsoft Scripting Games 2009 (see more entries here), but it's useful, so I think I'll keep it. This function uses recursion to work its way down the directory tree and get all folders and their sizes, and outputs them as psobjects for easy sorting, etc. It's not the fastest thing in the world, but it does the trick. Make sure to check out the examples in the help documentation.
Labels:
Get-ChildItem,
Get-DirSize,
PowerShell v2,
Recursion
Tuesday, June 9, 2009
The 2009 Scripting Games!
So the 2009 Scripting Games have begun! There are 10 events this year, and the theme is decathalon. This is my first year participating. The next few posts will be my solutions. Check out the Script Center for updates and event details.
Subscribe to:
Posts (Atom)