看来,Microsoft在Server 2016中删除了此registry项。
HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ WindowsUpdate \ Auto Update \ Results \ Install
有谁知道有最新的Windows Update安装成功date/时间的等效registry项? 或者也许是一个不同的方法来查询这个值?
我花了数小时search,但没有发现任何东西。 最近的registry键我可以find的是:
HKLM \ SOFTWARE \政策\微软\的Windows \ WindowsUpdate的\ AU
但是,它没有上次成功安装date/时间的关键。
经过testing,这家伙的发现工作:
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
给你一个很好的总结:
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) ...
当然,如果你只是想要date本身,你可以只是拿出描述和标题。