Created
May 14, 2020 02:53
-
-
Save ThePVD/4225d81275f75a410dce8883f8d3469b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# stolen from http://woshub.com/powershell-get-folder-sizes/ | |
gci -force . -ErrorAction SilentlyContinue | ? { $_ -is [io.directoryinfo] } | % { | |
$len = 0 | |
gci -recurse -force $_.fullname -ErrorAction SilentlyContinue | % { $len += $_.length } | |
$_.fullname, '{0:N2} GB' -f ($len / 1Gb) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment