答案 0 :(得分:1)
尝试此查询:
$Computers = Get-Content "\\networkpath\ComputerList.txt"
$csvFilePath = "\\networkpath\SoftwareList.csv"
$Computers |
%{Get-WmiObject -computerName $_ -Class CIM_Product -Filter 'Name like "%Microsoft Office Professional Plus%"' | select PSComputerName, Name, Version} |
Export-Csv $csvFilePath -NoTypeInformation