Commands / Text and objects

Sort-Object

Sort pipeline objects

beginner Text and objects Aliases sort

Sort-Object
 Get-ChildItem | Sort-Object -Property Length -Descending
Works on
WindowsLinuxmacOS
PowerShell
5.1 and later
Reference
Microsoft Learn: Sort-Object

Sorts by a property. -Descending reverses it. -Unique drops duplicates after sorting.

Try this

Get-Process | Sort-Object -Property WorkingSet -Descending | Select-Object -First 10

Coming from another shell

ShellWhat you might type
bash / zshls -S

More in From bash and From cmd.

Related commands