用 PowerShell 列出已安装的 Windows 更新与热修复
从 PowerShell 查询所有已安装热修复的补丁号、类型和安装日期,是确认某个 KB 补丁是否真正落地的最快方法。
在 PowerShell 中运行 `Get-HotFix | Sort-Object InstalledOn -Descending | Format-Table HotFixID, Description, InstalledOn -AutoSize`,或用 `Get-HotFix -Id KB5031354` 检查单个补丁。
01命令
命令
$ Get-HotFix | Sort-Object InstalledOn -Descending | Format-Table HotFixID, Description, InstalledOn -AutoSize02作用说明
Get-HotFix 封装了 WMI 的 Win32_QuickFixEngineering 类,无需管理员权限即可运行,还支持 -ComputerName 查询同域内的远程机器。输出包含 HotFixID(KB 编号)、Description(安全更新、累积更新等类型)和 InstalledOn(安装日期)。注意它的局限:不显示应用商店更新,而且在 Windows 11 累积更新机制下部分条目可能只显示基准安装日期。需要完整的历史记录(含功能更新)时,应与「设置 > Windows 更新 > 更新历史记录」交叉核对。
03风险
!注意: Get-HotFix 依赖 Win32_QuickFixEngineering 类,在 Windows 11 上并非完整更新历史——这里查不到某个 KB 并不能证明它没装。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- Get-HotFix | Microsoft Learn依据: Microsoft documents Get-HotFix as listing hotfixes installed on the computer via Win32_QuickFixEngineering, with HotFixID and InstalledOn properties.
- Get-HotFix - List installed hotfixes - PowerShell依据: SS64 shows Get-HotFix usage and notes it wraps the Win32_QuickFixEngineering WMI class for querying installed updates.
最后验证: 2026-09-17 · 分类: 系统与设置