Created
June 25, 2022 19:46
-
-
Save dulldesk/594e35796f3f9b76038029ad188597ca to your computer and use it in GitHub Desktop.
list directories by size in powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls -dir | % {[pscustomobject]@{Name=$_; Size=(ls $_ -rec -file | measure Length -Sum | select -exp sum)}} | sort -prop size -desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment