Skip to content

Instantly share code, notes, and snippets.

@Jammyjamjamman
Last active May 7, 2022 20:37
Show Gist options
  • Save Jammyjamjamman/2d656b56d61c51230299a38850d8055f to your computer and use it in GitHub Desktop.
Save Jammyjamjamman/2d656b56d61c51230299a38850d8055f to your computer and use it in GitHub Desktop.
Basic powershell script to get folder sizes in current dir (depth 1).
Get-ChildItem -Directory | ForEach-Object {
echo "Folder: $($_.Name)"
echo "Size: $((Get-ChildItem $_.Name -Recurse | Measure-Object -Property Length -Sum).Sum/(1024*1024*1024))GiB"
echo ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment