加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Shorcut列出Microsoft Windows中的挂起更新

发布时间:2020-12-14 00:05:55 所属栏目:Windows 来源:网络整理
导读:是否可以创建“查看更新历史记录”的快捷方式? 或者,您是否有一个脚本(powershell,vbs,cmd,…)来列出待定更新? 试试这个Powershell脚本: $update = new-object -com Microsoft.update.Session$searcher = $update.CreateUpdateSearcher()$pending = $sear
是否可以创建“查看更新历史记录”的快捷方式?

或者,您是否有一个脚本(powershell,vbs,cmd,…)来列出待定更新?

试试这个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 " "
}

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

$pending.Updates | member | more

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读