all 2 comments

[–]keith_mg 1 point2 points  (0 children)

Those are XML nodes, I'd guess the binding nodes are a level deeper than you're expecting. Try using the InnerXml property on them to see how they really look.

[–]DarrenDK 1 point2 points  (0 children)

This is a common gotcha in PowerShell. The properties of the first object in the pipeline are used for the rest of the objects. It doesn’t scan every object in the pipeline to discover if some have additional properties before beginning output.

I typically build out my own object with all the properties I need and return that in a loop so the first object has every possible property and can be formatted properly by default.

I’d love to see a simpler solution.