“Get-WmiObject Win32_QuickFixEngineering”返回带有未来日期的“InstalledOn”

时间:2017-06-12 10:40:22

标签: powershell date get-wmiobject

我想通过PowerShell查看安装安全更新的最新日期。因此,我想使用这样的东西:

Get-WmiObject Win32_QuickFixEngineering | Where-Object {
    $_.Description -eq "Security Update"
}

我尝试使用Get-CimInstance -Class,但这不适用于Windows 7.

输出是这样的:

Source        Description      HotFixID      InstalledBy          InstalledOn
------        -----------      --------      -----------          -----------
VM10111       Security Update  KB4014579     NT-AUTORITÄT\SYSTEM  05.11.2017 00:00:00

日期格式不正确还是显示不正确?怎么避免这个?

1 个答案:

答案 0 :(得分:1)

日期以MM.DD.YYYY格式显示。因此,代表的实际日期是2017年5月11日,而不是2017年11月5日。

您也可以尝试命令

Get-HotFix | where {$_.Description -eq 'Security Update'}

获取已安装的安全补丁

相关问题