How can I get a "du" -ish analysis using powershell? I'd like to periodically check the size of directories on my disk.
The following gives me the size of each file in the current directory:
foreach ($o in gci)
{
Write-output $o.Length
}
But what I really want is the aggregate size of all files in the directory, including subdirs. Also I'd like to be able to sort it by size, optionally.
EDIT: some additional context. I'm a dev, but I admin my dev machines.