How to determine the date and time of most recent successful Windows Update run on Windows Server 2016?
14,663
Solution 1
Tested and this guy's find did work:
Get-WmiObject -Class win32_reliabilityRecords -filter "sourcename = 'Microsoft-
Windows-WindowsUpdateClient'" -ErrorAction SilentlyContinue |
select @{LABEL = "date";EXPRESSION = {$_.ConvertToDateTime($_.timegenerated)}},
@{LABEL = 'Update';EXPRESSION = {$_.message}} |
FT -AutoSize -Wrap
Gives you a nice summary:
date Update
---- ------
8/18/2017 8:39:51 AM Installation Successful: Windows successfully installed
the following update: 2017-08 Cumulative Update for Windows Server 2016 for
x64-based Systems (KB4034658)
...
Of course you could just take out the description & titles if you just want the date itself.
Solution 2
I use:
Invoke-Command -ComputerName $ComputerName -ScriptBlock { (New-Object -com "Microsoft.Update.AutoUpdate").Results.LastInstallationSuccessDate} -ErrorAction SilentlyContinue
Be aware that the time is in UTC.
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
It appears that Microsoft removed this registry key in Server 2016.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install
Does anyone know of an equivalent registry key that has the last Windows Update install success date/time? Or perhaps a different method of querying this value?
I've spent hours googling, but have found nothing. Closest registry key I can find is:
HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
However, it has no key for last successful install date/time.