Summary: Learn how to use the Sort-Object Windows PowerShell cmdlet to sort on a specific property.
How can I sort a collection of Windows PowerShell objects without using the default property?
Use the –Property parameter and specify the name of the property to sort on:
get-childitem | sort-object -property length