我嘗試在Get-Service
輸出中添加一個新列。我發現的解決方案,直到現在,添加列,但不可能添加多個值。我保存在一個陣列輸出。例如像這樣:PowerShell:如何向Get-Service輸出添加一個包含值的新列?
$b = @()
$b += Get-Service wuauserv
你知道嗎,我怎麼可以改變正常的輸出中:
到Status Name DisplayName
- - - - - - - -- - - - -- - - - -
Running wuauserv Windows Update
Running sysmain Superfetch
是這樣的:
Status Name DisplayName ComputerName
- - - - - - - - - - - - - - - - - - - - - -- - - - - - -
Running wuauserv Windows Update Server1
Running sysmain Superfetch Server5
希望任何人都可以幫助我:)
非常感謝! – Temerita
不客氣:)繼續探索,你會越來越好。 – DarkLite1