Powershell: How to use Format-Table with XML data

后端 未结 1 440
不思量自难忘°
不思量自难忘° 2021-01-02 23:17

    
        123
        

        
1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-03 00:12

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

    $t.tickets.ticket | Format-Table -AutoSize -Property title, state, user-name, url,
    @{Label="number"; Expression={$_.number."#text"}},
    @{Label="closed"; Expression={$_.closed."#text"}}
    

    0 讨论(0)
提交回复
热议问题