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.
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.