Scripting Windows Updates Installs
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:
-
xcopy the PSWindowsUpdate module to the remote computer’s
\\ServerComputerName\c$\windows\System32\WindowsPowerShell\v1.0\Modules
folder. -
This creates the scheduled task and runs it :
1
Invoke-WUInstall -ComputerName -Script {import-module PSWindowsUpdate; Get-WUInstall -AcceptAll} -Confirm:$false
Comments