我将(使用 PowerShell 脚本)创建一个表并将结果(正/负)添加到其中。我有一个文本文件computers.txt,其中列出了所有PC。
像这样
CSNAME 修补程序信息 PC1 已安装 PC2 未安装 PC3 已安装 等等
使用我的实际脚本,我只能看到积极的结果。
Get-Content .\computers.txt | Where {
$_ -and (Test-Connection $_ -Quiet)
} | foreach {
Get-Hotfix -Id KB4012212 -ComputerName $_ |
Select CSName,HotFixID |
ConvertTo-Csv |
Out-File "C:\$_.csv"
}