Automatic Update Windows

 Although Powershell have modudule call PSWindowsUpdate but you cannot remote call windows update.


So you could use invoke-command -scriptblock to register-scheduletask  a get-windowsupdate -acceptall

  1.  Check the target computer have pswindowsupdate module or not
  2. if not copy it (assume it cannot direct access internet)
  3. create a Register-ScheduledJob to do windows update
  4. and check still have patch missing, if yes, repeat step 3

留言