2016-04-01 30 views
1

我正在构建一个Powershell脚本来下载Windows更新以使用DISM将它们融入离线Windows映像。例如,我的Windows 10搜索列表如下所示。Powershell如何确定哪些Windows更新没有被取代?

d   Id  KB  Title                      Rating 
-   --  --  -----                      ------ 
3/8/2016 MS16-036 3144756 Security Update for Adobe Flash Player              Critical 
3/8/2016 MS16-035 3141780 Security Update for .NET Framework to Address Security Feature Bypass      Important 
3/8/2016 MS16-034 3143145 Security Update for Windows Kernel-Mode Drivers to Address Elevation of Privilege   Important 
3/8/2016 MS16-033 3143142 Security Update for Windows USB Mass Storage Class Driver to Address Elevation of Privilege Important 
3/8/2016 MS16-032 3143141 Security Update for Secondary Logon to Address Elevation of Privile       Important 
3/8/2016 MS16-030 3143136 Security Update for Windows OLE to Address Remote Code Execution       Important 
3/8/2016 MS16-028 3143081 Security Update for Microsoft Windows PDF Library to Address Remote Code Execution   Critical 
3/8/2016 MS16-027 3143146 Security Update for Windows Media to Address Remote Code Execution       Critical 
3/8/2016 MS16-026 3143148 Security Update for Graphic Fonts to Address Remote Code Execution       Critical 
3/8/2016 MS16-024 3142019 Cumulative Security Update for Microsoft Edge            Critical 
3/8/2016 MS16-023 3142015 Cumulative Security Update for Internet Explorer           Critical 

我能做些什么来确定哪些更新没有被取代?

+0

您是如何得到这么多信息的?也就是说,你在使用什么API? –

+0

我从https://technet.microsoft.com/zh-CN/security/bulletin/?f=255&MSPPError=-2147217396获取了Powershell – slmaq

回答

0

道歉,我的问题和我的答案都不是程序性的。编程的答案可以满足我的需求,但我觉得它属于这个类别。

事实证明,为了更好地确定脱机映像所需的更新,请使用https://technet.microsoft.com/security/bulletin/上的Download Microsoft Security Bulletin Data链接。最好的选择是用程序查询Excel文件,然后确定哪些更新取代了其他更新。从那里,关于从DISM下载实际可用的MSU文件我不确定。然而,这足以回答我的问题,我不得不做一些互联网调查,以了解如何批量下载MSU文件列表。

1

根据您的情况和需求,运行a WSUS server可能是一种选择。您实际上不需要使用它来分发更新,但可以使用there's an API来查询WSUS服务器数据库。您也可以使用该API“批准”您想要的更新,从而导致WSUS下载它们。

我最好的猜测是,这对于你的场景来说可能是矫枉过正的,你在自我回答中建议的方法会更好。但是对于一些未来的读者来说,WSUS可能是一个更明智的选择,如果您遇到麻烦,您可以选择其他方式来考虑WSUS。

还应该注意的是,微软通过WSUS提供的一组更新与通过Windows Update提供的更新略有不同,并且/或者更新可能在不同时间被释放到两个通道。 (安全更新通常同时或几乎同时发布到两个通道。)