Hello everyone,
I would like to ask you for a help with retrieving information about status of Windows Updates on Windows Server 2016.
Short overview.
I am having script that converts vmware template (golden image) to virtual machine, then it is running some checks and once operating system is ready, it starts with Windows Update.
Problem description.
I am able to retrieve last check date and if it is older, than I am going to search if there are newer updates available.
Another value I need to get after last success search time and once updates are installed, is update installation results.
I do believe this website has information I need but unfortunately I do not know how to read information from these objects.
https://docs.microsoft.com/en-us/windows/win32/wua_sdk/windows-update-agent-object-model
Is there anyone who can help me or show me the way how to read this kind of information?
Please do not give me option to install some additional PowerShell module because I want to keep golden image as clean as possible.
Here is command I am using to get last check date
(New-Object -ComObject "Microsoft.Update.AutoUpdate").Results.LastSearchSuccessDate
Thank you for any reply
Filip