正在尝试获取所有已安装的更新(包括Acrobat等第三方应用程序的更新)单击控制面板中“程序和功能”中的“查看已安装的更新”即可查看。
下面的方法没有帮助,可能是因为它们仅限于Microsoft/Windows:
New-Object -ComObject Microsoft.Update.Session
Get-WmiObject Win32_QuickfixEngineering
Example: I want to get KB2565063 from attached image below
谢谢
发布于 2020-10-23 00:13:34
我找到了以下选项:
$x = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.DisplayName -like "*foo*" }
$y = Get-ItemProperty HKLM:\SOFTWARE\Classes\Installer\Dependencies\* | Where-Object {$_.DisplayName -like "*foo*" }
在$x中,你有来自“卸载程序”的软件,在$y中,你有来自“已安装的更新”的更新。
我对此不太满意,我想知道windows是如何将$x和$y链接在一起的,而不是简单地搜索名称。
也许有人可以为我们修复缺失的部分:-)
编辑
我找到了解决方案:
Get-ItemProperty HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.ParentDisplayName -like "*foo*" }
这将返回一个对象,其中ParentDisplayName
是您的程序,DisplayVersion
是更新版本。
发布于 2020-09-24 04:19:10
我假设您想要msu提供商提供的包:
get-package -ProviderName msu
Name Version Source ProviderName
---- ------- ------ ------------
Update for Microsoft Defend... msu
Security Intelligence Updat... msu
Security Intelligence Updat... msu
https://stackoverflow.com/questions/64031829
复制相似问题