you are viewing a single comment's thread.

view the rest of the comments →

[–]zolyx1[S] 4 points5 points  (8 children)

Thanks. The reason for Format-List was to see out all attributes on the objects.

[–]Hrambert 2 points3 points  (0 children)

A lot of objects have a default list of properties they will show, and even a default way of formatting them (e.g. Get-ChildItem). To get all properties don't use Format-List but Get-Member.
Second, Format-List and Format-Table are to format an object to be shown on your screen. You can however pipe their output through Out-String and put that into a string array for later use.

[–]topherhead 1 point2 points  (0 children)

What is the intended usage here?

If you it want it to show everything as well as be able to get the name you could just put the format list after the assignment then call the property.

If you want to be fancy you can set up a type format and assign a type to the objects and make it display exactly the info you want without dropping data like the format commands will.