powershell - 如何从已安装的更新窗口获取所有详细信息

标签 powershell wmi-query wmic powershell-cmdlet

Installed Updates Window - On windows 10 Enterprise

我想以任何文本格式获取所有这些信息(包括非 Windows 更新)... 如果您有任何方法可以获取这些信息,请分享。 欲了解更多详情,请参阅附图...

最佳答案

试试这个方法:

$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$HistoryCount = $Searcher.GetTotalHistoryCount()
$Updates = $Searcher.QueryHistory(0,$HistoryCount)
$Updates |  Select Title,@{l='Name';e={$($_.Categories).Name}},Date

关于powershell - 如何从已安装的更新窗口获取所有详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36761787/

相关文章:

windows - 使用 .bat 文件从 Windows 启动中删除程序

c++ - WMI 给我不完整的硬件信息 (PhysicalMemory)

c++ - 通过 MSFT_NetAdapter 启用/禁用网络适配器

powershell - Powershell get-Itemm VersionInfo.ProductVersion错误/与WMI不同

模块中的 PowerShell .ps1 文件 cmdlet

powershell - WMI:通过另一个程序运行 shell 命令时出现无效类错误

python - 使用 python 子进程获取硬件 id 时出错

powershell - DSC 自定义资源依赖项

powershell - 卸载组件

python - 导入 virtualenvwrapper 时的 Set-ItemProperty 消息