PowerShell 4.0
I read about Sort-Object cmdlet here (TechNet page). I don\'t understand how to use -InputObject parameter. That page hasn\'
The process block of a function automatically deals with a collection over a pipe, but not if it's passed as a command line argument. Some cmdlets put in an extra foreach loop to process -inputobject collections or lists, but most don't.
However, any parameter that can take input from a pipe, can also take a script block from the command line. So that may come in handy some time. You'll see examples like this in the help.
PS C:\> echo a,b,c,d | sort -InputObject { $_.ToUpper() } -Descending
D
C
B
A