I need to get the size of a directory, recursively. I have to do this every month or so. I want to make a powershell script to do it.
Windows – PowerShell Script to Get a Directory Total Size
filesystemspowershellscriptingwindows
Related Topic
- Powershell – Find all emails in outlook inbox which are “undelivered” with powershell
- Powershell – Get user home directories recursively in PowerShell
- PowerShell Output Stops Until Enter Pressed – Causes and Fixes
- Windows – email output of powershell script
- Powershell – Customizing powershell font face and size
- Windows – PowerShell script to report free disk space on servers
Best Answer
I asked the same question in stackoverflow and I get this excellent answer:
This actually produces a bit of a summary object which will include the count of items. You can just grab the Sum property though and that will be the sum of the lengths.
Thanks to JaredPad for the answer.