Scripting Windows Updates Installs

less than 1 minute read

Description:

I haven’t tested this yet, but this seems to be the only way to script Windows Updates at this time if you don’t have a tool such as Ansible, Puppet, SCCM, or WSUS.

To Resolve:

  1. xcopy the PSWindowsUpdate module to the remote computer’s \\ServerComputerName\c$\windows\System32\WindowsPowerShell\v1.0\Modules folder.

  2. This creates the scheduled task and runs it :

    1
    
    Invoke-WUInstall -ComputerName -Script {import-module PSWindowsUpdate; Get-WUInstall -AcceptAll} -Confirm:$false
    

Tags:

Updated:

Comments