F Morrison
2016-05-22 13:29:09 UTC
How can I simple add/append ADDITIONAL output to the pipeline without losing/destroying what comes in?
For example, in my attempt to turn NetPrfile.InterfaceAlias into a simpler variable named InterfaceAlias, I lose everything else that comes in by the time the information reaches Format-Table:
Get-NetIPConfiguration -Detailed |
Select-Object @{label='InterfaceAlias';expression={$_.NetProfile.InterfaceAlias}} |
Format-Table
I do NOT want to have to create a custom object and have to manually type every property and value that I need to build up that custom object, so please, do NOT waste my time by suggesting that approach.
In an ideal world, I would so something like
Append-ToPipeline $someVariable
which would give me a variable that would have a name of someVariable and a value of whatever is the current value of $someVariable.
For example, in my attempt to turn NetPrfile.InterfaceAlias into a simpler variable named InterfaceAlias, I lose everything else that comes in by the time the information reaches Format-Table:
Get-NetIPConfiguration -Detailed |
Select-Object @{label='InterfaceAlias';expression={$_.NetProfile.InterfaceAlias}} |
Format-Table
I do NOT want to have to create a custom object and have to manually type every property and value that I need to build up that custom object, so please, do NOT waste my time by suggesting that approach.
In an ideal world, I would so something like
Append-ToPipeline $someVariable
which would give me a variable that would have a name of someVariable and a value of whatever is the current value of $someVariable.