You can update scripted or deployments with Microsoft updates via a power shell module.
You can install this ahead in your golden image and just run the last 2 lines of the PS script
Go to https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc
download the Windows Update PowerShell Module
To install as post tasks:
Create an AutoIT script to xcopy the files to the PS modules directory:
RunWait(@ComSpec & " /c " & "xcopy.exe .\source\*.* C:\Windows\System32\WindowsPowerShell\v1.0\Modules /s /q /y","",@SW_MINIMIZE)
Zip that along with the files to install
I created a task group for the 2 items
First task copies the files
The second task installs and starts the windows updates. (check reboot required for this task)
The powershell script uppdate1.ps1: (line 1 installs; line2 adds Microsoft-updates as well; line 3 executes the job)
Import-Module PSWindowsUpdate
Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d -Confirm:$false
Get-WUInstall -MicrosoftUpdate -IgnoreUserInput -AcceptAll -IgnoreReboot -Verbose
Here are the tasks within my custom deployment ( note I run the update after I install Office to get those updates also.)
1. Create a temp folder on your desktop. open that folder in explorer
2. In that folder place the autoit exe you complied.
3. Create another folder called "source" in the folder. (the exe is looking for that folder as the copy source.) [.\source\*.*]
4. Expand the zip file that you downloaded . In that expanded zip is a directory "PSWindowsUpdate" drag that to the source directory.
5. Be in the folder you created in explorer. Highlight both the exe and the source folder.
6. Right click on the two and choose "send to" - "compressed (zipped) folder"
7. upload that zip and delete temp folder when all is well.
The command will copy the entire folder PSWindowsUpdate and its contents to ...\modules because of the /S switch
When done on the system drive you should get:
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate with the files in that - SMal.tmcc 5 years ago
this one says give me all {Get-WUInstall -MicrosoftUpdate -IgnoreUserInput -AcceptAll -IgnoreReboot -Verbose}
I googled "pswindowsupdate command options"
this post explains a lot of the options and you will find others to guide you to that option
https://www.petri.com/manage-windows-updates-with-powershell-module - SMal.tmcc 5 years ago