2

I was using below powershell script to update windows https://gallery.technet.microsoft.com/scriptcenter/Execute-Windows-Update-fc6acb16#content

It works fine for Windows updates. But it does not install/update the Microsoft Updates

I am looking for script which automates Both important and optional updates as shown below.

enter image description here

How can I alter this script? (Script can be found in above link)

kudlatiger
  • 361
  • 2
  • 5
  • 18

1 Answers1

1

This module can be configured to use Microsoft update.

Force Windows update, using Microsoft update, accept all, and reboot

Import-Module PSWindowsUpdate
# register ms update service
Add-WUServiceManager -ServiceID "7971f918-a847-4430-9279-4a52d1efe18d" -Confirm:$false
Install-WindowsUpdate -AcceptAll -MicrosoftUpdate -AutoReboot
Zoredache
  • 130,897
  • 41
  • 276
  • 420