Q: Output as side effect in Powershell I pipe Select-Object and want output from the selects as I go.
I could use $_, variables or loops but hope for a nicer implementation,
one that just outputs to the console as a side effect and continues, like
Get-Whatever | Pipe-Out Name, Phone | Do-Whatever Surname, Address | ...


My example string is
Get-VM  | Select-Object VMId | Get-VHD | Select-Object path, parentpath | Format-List

which gives me roughly the output
Path                           ParentPath
----                           ----------
C:\Users\...\Ubuntu...avhdx    C:\Users\...\Ubuntu.vhdx
C:\Users\...\Foss...avhdx      C:\Users\...\Foxx..vhdx

where I want the Name from Get-Vm too. (Get-VM | Select-Object Name).
Name      Path                           ParentPath
----      ----                           ----------
Ubuntu    C:\Users\...\Ubuntu...avhdx    C:\Users\...\Ubuntu.vhdx
Foss      C:\Users\...\Foss...avhdx      C:\Users\...\Foxx..vhdx


A: I don't have that command, but there is a -PipelineVariable common parameter.  
get-vm -pipelinevariable vm | get-vhd |
  select-object @{n='name'; e={$vm.name}}, path, parentpath 

