Say you want to sort the output of “ls” (Get-ChildItem) according to file size, date modified or alphabetically, try:
1. Sort according to file size:
ls | sort -property Length
2. Sort according to data modified:
ls | sort -property LastWriteTime
3. Sort according to Name:
ls | sort -property Name
To return a descending list, just add -descending at the back. This applies any stdout pipes, not just Get-ChildItem.