NAME
Sort-Object
SYNOPSIS
Sorts objects by property values.SYNTAX
Sort-Object [[-Property]
[-Unique] [
] DESCRIPTION
The Sort-Object cmdlet sorts objects in ascending or descending order based on the values of properties of the
object.You can specify a single property or multiple properties, for a multi-key sort, and you can select a
case-sensitive or case-insensitive sort. You can also direct Sort-Object to display only the objects with a unique
value for a particular property.PARAMETERS
-CaseSensitive [
Indicates that the sort should be case sensitive. By default, sorting is not case sensitive. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Culture
Specifies the cultural configuration to use when sorting. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Descending [
Indicates that the cmdlet sorts the objects in descending order. The default is ascending order. The Descending parameter applies to all properties. To sort by some properties in ascending order and others in descending order, you must specify their property values by using a hash table. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -InputObject
Specifies the objects to sort.When you use the InputObject parameter to submit a collection of items, Sort-Object receives one object that
represents the collection. Because one object cannot be sorted, Sort-Object returns the entire collection
unchanged.To sort objects, pipe them to Sort-Object .
Required? false Position? named Default value None Accept pipeline input? True (ByValue) Accept wildcard characters? false-Property
Specifies the properties to use when sorting. Objects are sorted based on the values of these properties. Enter the names of the properties. Wildcards are permitted. If you specify multiple properties, the objects are first sorted by the first property. If more than one object has the same value for the first property, those objects are sorted by the second property. This process continues until there are no more specified properties or no groups of objects. If you do not specify properties, the cmdlet sorts based on default properties for the object type. The value of the Property parameter can be a calculated property. To create a calculated, property, use a hash table. Valid keys are:- Expression
or