Advertisement
meetsos

List Subfolders with sizes

Mar 27th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.22 KB | None | 0 0
  1. Powershell
  2.  
  3. Get-ChildItem | Where-Object { $_.PSIsContainer } | ForEach-Object { $_.Name + ": " + "{0:N2}" -f ((Get-ChildItem $_ -Recurse | Measure-Object Length -Sum -ErrorAction SilentlyContinue).Sum / 1MB) + " MB" }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement