PowerTip: Sorting More than One Column

PowerTip: Sorting More than One Column

  • Comments 1
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment