Hi
Thanks for your update, I tried with this below mention script but i got error unable to install windows upadte can you please checka nd help on this issue.
$Servers = Get-Content -Path "C:\Temp\Patch\serverlist.txt"
$Source = "\Server\D\Patching\feb22\win2012\"
$Dest = "C$\Temp\Patch\"
$Testpath = "\Server\D\Patching\feb22\win2012\"
foreach ($Server in $servers) {
if (test-Connection -ComputerName $Servers) {
Copy-Item $Source -Destination \$server\$dest -Rescurse -Force
if (Test-Path -Path $testpath) {
Write-Host "Patches Installing on $server"
Invoke-Command -ComputerName $server -ScriptBlock {(&cmd.exe /c or Powershell.exe wusa.exe /I "C:\Temp\Patch\Windows8.l-kb5008603-x64_58f1b60cb6250c4fb1e2d4c86o16eeef71ce6d1e.msu",
"windows8.1-kb5010215-x64_Oeclcede5ece93cee398a2366c6a6489627030.msu" /Quiet /norestart)}
Write-Host "Patch Installation Completed Successfully on $server" -ForegroundColor Green
}
} else {
Write-Host "Patch Installation Failed, $Server not reachable or not online" -ForegroundColor Red
}
}
in c temp inside patch folder create and files copied by script, But not installed try to install patch got failed ( I tried both &cmd.exe /c and powershell.exe) i checked in event viewer below error shown
Windows update could not be installed of error 2147942402 "The System cannot find the file specified."(Command line ""C:\Windows\System32\wusa.exe" /I "C:\Temp\Patch\Windows8.l-kb5008603-x64_58f1b60cb6250c4fb1e2d4c86o16eeef71ce6d1e.msu",
"windows8.1-kb5010215-x64_Oeclcede5ece93cee398a2366c6a6489627030.msu" /Quiet /norestart)}.
- While i try to install windows update patch got failed facing error (I tried both &cmd.exe /c and powershell.exe) i checked in event viwer below error shown, but mentioned path kb article files availble in location
Windows update could not be installed of error 2147942402 "The System cannot find the file specified."(Command line ""C:\Windows\System32\wusa.exe" /I "C:\Temp\Patch\Windows8.l-kb5008603-x64_58f1b60cb6250c4fb1e2d4c86o16eeef71ce6d1e.msu",
"windows8.1-kb5010215-x64_Oeclcede5ece93cee398a2366c6a6489627030.msu" /Quiet /norestart)}
- I have Multiple OS 2012,2016,2019 and more KB Articles have in common path that all how can i install thorugh scripts (.msu,.msi,.msp,.exe) (.msu and .msi,.msp and .exe which one required to install patch like wusa.exe or msiexec.exe)
- Common path i have more files but i need to install few updates only like i have 7 or 8 patches,But i want to install 3 patches only that how can i install.
- I required out put details in csv or html file which patch got installed and which patch got not installed or failed on server wise with kb article details.