Get directory size in PowerShell

Example - measuring Documents folder:

ls -r ~/Documents | measure -sum Length

You can do it from CMD:

powershell -noprofile -command "ls -r ~/Documents | measure -sum Length"