powershell – 我可以更改WSUS中的更新说明吗?

在每个微软补丁日,我都有大量新的更新,我想批准给我的客户.但是,我不是“批准所有更新并继续”,而是在其知识库文章中收集有关每个更新的信息,以确定这是否是对我们而言的重要更新.

这是一项相当繁琐的任务,因为我必须在客户端的浏览器中键入相应的KB编号并等待加载网页.我想知道为什么Microsoft没有使用WSUS控制面板上的更新描述框来显示真正有用的详细信息.相反,我的所有更新都是:

Install this update to resolve issues in Windows. For a complete listing of the issues that are included in this update,see the associated Microsoft Knowledge Base article for more information. After you install this item,you may have to restart your computer.

我开始考虑一个小的Powershell脚本,它为我添加了必要的信息.但是我在第一步失败了,它正在手动更改更新说明:

PS C:\Users\Administrator> $wsus = Get-WsusServer

PS C:\Users\Administrator> $update = $wsus.SearchUpdates(‘KB3013791’)

PS C:\Users\Administrator> $update[0].Description
Install this update to resolve issues in Windows. For a complete listing of the issues that are included in this update,you may have to restart your computer.

PS C:\Users\Administrator> $update[0].Description = ‘”0x00000133″ Stop error when there”s faulty hardware in Windows 8.1 or Windows Server 2012 R2’

PS C:\Users\Administrator> $update[0].Description
“0x00000133” Stop error when there’s faulty hardware in Windows 8.1 or Windows Server 2012 R2

PS C:\Users\Administrator> $update = $wsus.SearchUpdates(‘KB3013791’)

PS C:\Users\Administrator> $update[0].Description
Install this update to resolve issues in Windows. For a complete listing of the issues that are included in this update,you may have to restart your computer.

似乎我的更改没有提交到数据库.要么我缺少某种$wsus.SubmitChanges()或$wsus.SearchUpdates()命令返回’update.Clone()’,以便我的更改保存到任何地方.

如何实现更改WSUS更新描述的目标?

更新

通过使用下面的答案,我创建了一个小工具,可以自动将描述添加到我的WSUS服务器.我决定在Github上发布我的工具,所以请随意尝试测试它.

https://github.com/Physikbuddha/wsus-online-descriptions/releases/latest

原始答案

我试图通过评论部分中的mortenya建议解决Get-Member的问题,但没有运气.
最后,我最终直接编辑了WSUS数据库来更改描述.

小心!只有在您完全确定自己在做什么时才使用我的解决方案.编辑服务器所依赖的数据库就像对你最好的朋友进行心脏直视手术一样.

我的WSUS安装使用Windows Internal Database来存储更新信息.由于此版本不允许远程查询,因此我不得不使用SQL Server Management Studio的本地安装.
使用上面链接的文章提供的服务器名称连接到数据库.

我可以通过运行此查询来更改更新说明:

UPDATE tbPreComputedLocalizedProperty
SET Description = '"0x00000133" Stop error when there''s faulty hardware in Windows 8.1 or Windows Server 2012 R2'
FROM tbPreComputedLocalizedProperty p
JOIN tbUpdate u ON p.UpdateID = u.UpdateID
JOIN tbRevision r ON u.LocalUpdateID = r.LocalUpdateID
JOIN tbKBArticleForRevision kb ON r.RevisionID = kb.RevisionID
WHERE kb.KBArticleID LIKE '3013791' AND p.ShortLanguage = 'en'
GO

这只是一种手动设置描述的方法,因此我将进一步尝试如何直接从KB网站获取描述并自动应用于所有新更新.我将把这些信息添加到这篇文章中.

相关文章

文章浏览阅读2.2k次,点赞6次,收藏20次。在我们平时办公工作...
文章浏览阅读1k次。解决 Windows make command not found 和...
文章浏览阅读3.2k次,点赞2次,收藏6次。2、鼠标依次点击“计...
文章浏览阅读1.3w次。蓝光版属于高清版的一种。BD英文全名是...
文章浏览阅读974次,点赞7次,收藏8次。提供了更强大的功能,...
文章浏览阅读1.4w次,点赞5次,收藏22次。如果使用iterator的...