简体   繁体   English

如何使用Powershell远程安装“重要” Windows Update?

[英]How do I install “Important” Windows Updates remotely using Powershell?

I have the PSWindowsUpdates module installed on my servers. 我的服务器上安装了PSWindowsUpdates模块。

I run the following command to get a list of available updates on PowerShell, 我运行以下命令以获取PowerShell上可用更新的列表,

Get-WUList -ComputerName PC-1

This provides a list of available updates, how do i amend the code above to only list Important Updates? 这提供了可用更新的列表,我如何修改上面的代码以仅列出重要更新?

Also, can you advise on the easiest way to install these updates on multiple servers remotely, with the server names being placed in an excel file? 另外,您能否建议最简单的方法,将这些更新远程安装到excel文件中,从而在多个服务器上远程安装这些更新? I am thinking of using a foreach loop, but don't know how to format it. 我正在考虑使用一个foreach循环,但是不知道如何格式化它。

I'm a novice when it comes to PowerShell, and programming unfortunately. 在PowerShell和编程方面,我是一个新手。

Thanks in advance. 提前致谢。

I agree with @Bill_Stewart. 我同意@Bill_Stewart。 The "right" solution here is not to use PowerShell to program a way to do this. 这里的“正确”解决方案是不使用PowerShell来编程实现此目的的方法。

Use a software tool like WSUS (free) or for example Ivanti (paid, and what I currently use). 使用WSUS(免费)之类的软件工具,或使用Ivanti (付费,以及我目前使用的软件)之类的软件工具。 They are built to do exactly what you need to do. 它们旨在完全满足您的需要。 You can both filter and select the patches you want to apply by severity or type, and also select or build groups of computers that you want to action against, along with scheduling and credential management. 您既可以按严重性或类型筛选和选择要应用的补丁,也可以选择或构建要对其进行操作的计算机组,以及计划和凭据管理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM