Powershell: How to use Format-Table with XML data

Question:


I am a Powershell newbie and find a question on xml and format-table. Given above xml file. If I run below script to display tickets in a table, the value of “number”, “closed” could not be shown

Return:

Is it the only way I have to use foreach and selectSingleNode("ticket").get_InnerXml() to get all the values?

Thank you.

Answer:

If you notice those nodes have attributes so you will need to get to the data of the node. try the following:

Source:

Powershell: How to use Format-Table with XML data by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply