Skip to content

Instantly share code, notes, and snippets.

@pmolchanov
Created April 1, 2015 22:29
Show Gist options
  • Save pmolchanov/1ad5bd710fcc15051ee0 to your computer and use it in GitHub Desktop.
Save pmolchanov/1ad5bd710fcc15051ee0 to your computer and use it in GitHub Desktop.
Finds large files on your C: drive
Get-ChildItem C:\ -Recurse -ErrorAction 'silentlycontinue' | Where-Object {$_.Length -gt 100MB} | Sort-Object -Property Length -Descending | Select-Object -First 10 | Format-Table -AutoSize -Wrap -Property FullName,Length | Out-String -Width 4096 | Out-File "foo.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment