Everyday is a new day , with new problems and new issues, sometime at users side and sometime at Server side. The life in IT is quite happening.
These new issues and problems leads to new solutions and new scripts.
In my environment I asked few users to run their windows updates, but as you know user never listen ;o), So i thought to find out which users had install and run windows update and which is not.
The first thing which come in my mind is to check any com object available to windows update.
Luckily i found a “Microsoft.Update.AutoUpdate” com object and i thought lets give it a try.
I create a new Powershell Object using New-Object cmdlet.
$windowsUpdateObject = New-Object -ComObject Microsoft.Update.AutoUpdate
My this new variable has a property of Results. So when I access the .Result property using dot notation, i have found the result what i was looking for, The windows last Search success date and Windows update last installation date.
You can see the windows automatic basic setting using .Settings property.
The most cool thing which i have found is ShowSettingsDialog(), method. When you run this method it opens a Windows Update configuration GUI.
I hope you like it.
Thanks for your time and Happy Weekend.