如何确定最近在 Windows Server 2016 上成功运行的 Windows 更新的日期和时间?

Pet*_*erk 6 windows-update windows-registry windows-server-2016

Microsoft 似乎在 Server 2016 中删除了此注册表项。

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install

有谁知道具有上次 Windows 更新安装成功日期/时间的等效注册表项?或者也许是查询这个值的不同方法?

我花了几个小时谷歌搜索,但一无所获。我能找到的最近的注册表项是:

HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU

但是,它没有上次成功安装日期/时间的密钥。

小智 3

经过测试,这个人的发现确实有效:

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
Run Code Online (Sandbox Code Playgroud)

给你一个很好的总结:

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)
...
Run Code Online (Sandbox Code Playgroud)

当然,如果您只想要日期本身,您可以只取出描述和标题。

https://www.experts-exchange.com/questions/28713293/How-to-get-last-success-date-time-of-Windows-Update-on-Windows-10.html

https://blogs.technet.microsoft.com/heyscriptingguy/2011/08/22/use-powershell-to-easily-find-information-about-hotfixes/