I have a array list of PSCustomObjects that I can output with Format-Table and looks like expected.
Name Property1 Property2 Property3
---- --------- --------- ---------
name1 value1 value2 value3
Now it happens, that one property of the PSCustomObject needs to hold two (or more) values, so I decided to follow an object-oriented approach and change that property to a PSCustomObject also, ending up in a list of objects containing objects, then the output looks like this:
Name Property1 Property2 Property3
---- --------- --------- ---------
name1 value1 @{Sub1=valueX; Sub2=valueY} value3
What I am searching for is some sort of recursively output of Format-Table, which expands the object inside, to look something like this:
Name Property1 Sub1 Sub2 Property3
---- --------- ---- ---- ---------
name1 value1 valueX valueY value3
Is this possible anyhow? Or do I have to fallback to "normal" lists when building up that object list?
thank you!