I want to sort a list of strings in powershell, but when I attempt to do so I get a result that is not sorted at all.
PS C:\Windows\system32> "bbb", "aaa", "ccc" | sort
bbb
ccc
aaa
Am I doing something wrong?
Try to be sure to use the good CmdLet:
"bbb", "aaa", "ccc" | Sort-Object
Works for me:
aaa bbb ccc
Then try to verify your alias:
PS> Get-Alias sort CommandType Name Version Source ----------- ---- ------- ------ Alias sort -> Sort-Object
sort is an alias for sort-object so I get the same result.