Sorts the input objects by property values.
Snap-In: Microsoft.PowerShell.Utility
Syntax:
Sort-Object [
[-Property] <Object[]>] [-Descending] [-Unique] [-InputObject <PSObject>] [-Culture <String>] [-CaseSensitive] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
Description:
The Sort-Object Cmdlet is essentially a filter used to sort objects according to parameters, properties, or attributes, and then pass them down the pipeline. It is usually used in conjunction with cmdlets that collect data such as get-service or get-process. The cmdlet works with files, modules, registry keys, and other objects. Using sort-object without any parameters will work, but the cmdlet will try to sort with the properties in DefaultKeyPropertySet if it's defined. Otherwise it will sort by default methods that are dependent upon what is being sorted.