September 1st, 2014

PowerTip: Use PowerShell to Sort Array

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to sort an array.

Hey, Scripting Guy! Question How can I use Windows PowerShell to sort an array?

Hey, Scripting Guy! Answer Use the static Sort method from the [array] class, for example:

$a = 1,2,4,5,3,6

  [array]::sort($a)

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.