我想在行和cols样式中返回下面的输出,而不是一个接一个。
$path = "$([Environment]::GetFolderPath("Desktop"))\Installed Hotfixes Info.txt";
Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName . | fl * | Format-Table -AutoSize |fl > $path; notepad $path;
答案 0 :(得分:0)
删除Format-List
(fl
):
Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName . |
Format-Table -AutoSize |
Out-File $path
更好的是,将输出导出为CSV:
Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName . |
Export-Csv $path -NoType