How to Get Folder Size in PowerShell (Including Subfolders)
To get a folder’s size in PowerShell, list every file under it with Get-ChildItem -Recurse and add up their Length values with Measure-Object. The result is in bytes, so divide by 1MB or 1GB: Output: A folder doesn’t store its own size, so PowerShell has to add up the files, just like the Properties window … Read more