Files Sorted by Size in Descending Order

This powershell command will recurse the C drive and export a list of files sorted by size in descending order. This may be helpful if you need to find which files are taking up the most space. You may get denied errors for some folders that are protected by Windows.

This will provide output to Export-CSV

get-childitem -Path c:\ -Recurse | Select -Property Directory, Name, Length | Sort -Property Length -Descending | Export-CSV -Path c:\test.csv