(Get-Process).Id
can expressed by a pipeline command
Get-Process |% Id
which translates to
Get-Process | Foreach-Object { $_.Id }
This short form of writing Foreach-Object
is actually also available for method calls:
Get-Process |% WaitForExit 55
you 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.