powershellpowershell-2.0

Powershell - Install Windows Updates?


Is this possible?

I guess we would need to invoke the WUAgent somehow to run a detection, but I would like to essentially download and install updates, then reboot as part of the script.

This will be part of a larger script to basically build a vanilla 2008R2 box up to a DC all through Powershell.


Solution

  • Take a look at the PSWindowsUpdate module for PowerShell.

    It is located here at the Script Center