Install Windows Update Powershell
Fri May 12 2023 13:18:40 GMT+0000 (Coordinated Universal Time)
Saved by
@Curable1600
Install-Module PSWindowsUpdate
Add-WUServiceManager -MicrosoftUpdate
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot | Out-File "C:\($env.computername-Get-Date -f yyyy-MM-dd)-MSUpdates.log" -Force
$Computers = "pc2,pc3,pc4"
Invoke-WUJob -ComputerName $Computers -Script {Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot} -RunNow -Confirm:$false | Out-File "c:\$Computers-$(Get-Date -f yyyy-MM-dd)-MSUpdates.log" -Force
content_copyCOPY
1) To install Windows updates via PowerShell, you need to install the module first:
2) Install all available updates
3) Force other computers to update
Comments