Script - Display File list with sizes

powershell.jpg

In Powershell we can display a list of files, such as doing a dir in a command prompt or doing a file view.  We do however have some special abilities that we can only do through powershell.  Below are a few examples.

Sort by Name with Length

Get-ChildItem FolderName | Select-Object Name, Length

Get Top 10 by size (to change the "top number" change the 10 to whatever)

Get-ChildItem FolderName | Select-Object Name, Length | sort-object length -descending | select-object -first 10