In PowerShell, if I have a list of strings containing versions, \"3.0.1.1\", \"3.2.1.1\", etc., how can I sort it the way System.Version would sort it in C#?
PS C:\> $ver="3.0.1.1","3.2.1.1" PS C:\> $ver|%{[System.Version]$_}|sort Major Minor Build Revision ----- ----- ----- -------- 3 0 1 1 3 2 1 1