PowerTip: Sorting More than One Column

Doctor Scripto

Summary: Learn to sort by more than one column in Windows PowerShell.

Hey, Scripting Guy! Question Can I use Windows PowerShell to sort by more than one column, and have the primary column be ascending
          and secondary column be descending?

Hey, Scripting Guy! Answer In the Help examples, you'll see that the Property parameter accepts a hash table in place of a
          real property name. In this hash table, you can specify the property to sort by and the order per property.
          Copy Example 5 from the Help file and edit to suit your needs.

Image of Help file


Discussion is closed.

Feedback usabilla icon