在 Microsoft Windows 中列出挂起的更新的快捷方式

TN.*_*TN. 5 scripting windows shortcut windows-update

是否可以创建“查看更新历史记录”的快捷方式?

或者,您是否有脚本(powershell、vbs、cmd 等)来列出待处理的更新?

Den*_*son 3

尝试一下这个 Powershell 脚本:

$update = new-object -com Microsoft.update.Session
$searcher = $update.CreateUpdateSearcher()
$pending = $searcher.Search("IsInstalled=0")
foreach($entry in $pending.Updates)
{
    Write-host "Title: " $entry.Title
    Write-host "Downloaded? " $entry.IsDownloaded
    Write-host "Description: " $entry.Description
    foreach($category in $entry.Categories)
    {
        Write-host "Category: " $category.Name
    }
    Write-host " "
}
Run Code Online (Sandbox Code Playgroud)

您可能感兴趣的其他对象成员可以使用以下方式查看:

$pending.Updates | member | more
Run Code Online (Sandbox Code Playgroud)