(Get-Process).Idcan expressed by a pipeline command
Get-Process |% Idwhich translates to
Get-Process | Foreach-Object { $_.Id }This short form of writing Foreach-Object is actually also available for method calls:
Get-Process |% WaitForExit 55you dont have to go to the beginning of the line, and put an opening brace there.
An alternative solution to this is Select-Object -ExpandProperty, but its much longer.