从注册表 Uninstall 键列出已安装程序

读取注册表卸载键,枚举已安装软件的版本、发布者和安装日期,可脚本化盘点。

Windows注册表软件PowerShell低风险
运行 Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*' | Where DisplayName | Select DisplayName, DisplayVersion, Publisher, InstallDate。

01命令

命令
$ Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*' |
  Where-Object DisplayName |
  Select-Object DisplayName, DisplayVersion, Publisher, InstallDate |
  Sort-Object DisplayName

02作用说明

所有 MSI 和大多数安装程序都会在 ...\Uninstall 下注册条目,所以这个键比 Get-Package 更全,而且能脚本化盘点——HKCU:\...\Uninstall 下还有按用户安装的软件。64 位系统上 32 位程序在 Wow6432Node 子路径下,两个路径都要查,否则会漏掉近一半软件。条目中的 UninstallString 和 QuietUninstallString 值还能直接提供静默卸载命令,方便脚本化卸载。

03风险

风险低风险
使用条件Add the Wow6432Node path as well to include 32-bit apps on 64-bit Windows

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • Uninstall Registry Key
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Documents the Uninstall key's DisplayName, DisplayVersion, and InstallDate values.

最后验证: 2026-09-17 · 分类: 系统与设置

06相关方案