Created
November 13, 2018 14:16
-
-
Save JaekelEDV/e055f358d8ca179bdf72dc74fe5fa4d6 to your computer and use it in GitHub Desktop.
Get-BiggestFile.ps1
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
$Props = 'Name', @{Name = 'Size in GB'; Expression = {$_.Length / 1GB -as [int]}}, @{Name = 'Size in MB'; Expression = {$_.Length / 1MB -as [int]}}, 'Directory' | |
Get-ChildItem -Recurse | Sort -Descending -Property Length | select -First 5 $Props | Format-List |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment