我是PowerShell的新手,我只是想弄明白它是如何工作的。在PowerShell中调用没有管道的排序对象
所以,我怎么可以这样写代码:
Get-ChildItem C:\ | Sort-Object Length
多内衬代码?我试过这个:
$child_items = Get-ChildItem C:\
Sort-Object $child_items Length
但它没有工作。我越来越:
Sort-Object : A positional parameter cannot be found that accepts argument 'Length'.
...如果你不喜欢它,你可以投票了这个连接项目:http://connect.microsoft.com/PowerShell/feedback/details/568524/sort-object-does-not-sort-items-在的集合,传入-透inputobject参数 – BartekB 2013-03-18 11:22:27