I'm new to PowerShell and am just trying to figure out how it works exactly.
So, how can I write this code:
Get-ChildItem C:\ | Sort-Object Length
as multi lined code? I tried this:
$child_items = Get-ChildItem C:\
Sort-Object $child_items Length
but it didn't work. I'm getting:
Sort-Object : A positional parameter cannot be found that accepts argument 'Length'.