# LANG |
Get-ChildItem "C:\" | ? { $_.PsIsContainer} | ft -AutoSize
Get-ChildItem "C:\" | % { write-host $_.BaseName}
$myObjs = @([PSCustomObject] @{Name="Jack"; Age="10";},
[PSCustomObject] @{Name="Tom"; Age="15";})
$myObjs | foreach-object{$counter = 0}{
Write-Host $counter - $_.Name is $_.Age years old.
$counter++
}
'This', 'Is', 'a', 'cat' | & {"$input"}
'This', 'Is', 'a', 'cat' | & {$ofs='-';"$input"}