Automatically apply Windows updates using scripted tasks 编辑
As an IT admin, you might have many devices to manage. They might exist in different domains and have different security levels or Windows OS versions. Updating those devices in a timely manner to prevent potential risks can be a tedious task. To achieve this goal, you might do the following:
-
Collect information related to updates.
-
Draw comparisons between the collected information to identify the devices where updates are missing.
-
Apply one or more updates to relevant devices one by one.
Workspace Environment Management (WEM) provides you with a scripted task feature that simplifies the task of applying updates to your devices.
All you need to do is configure two scripted tasks. A general workflow is as follows:
-
Prepare two scripts and create a file
-
Add two scripted tasks
-
Configure the two scripted tasks
-
View the task execution report
Prepare two scripts and create a file
-
Prepare a script that monitors available updates.
$List = Get-Content \\hyenvwemserver\share\hotfix.list $Applied = Get-HotFix | Select-Object -ExpandProperty HotFixID $ExitCode = 0 $List | ForEach-Object { if(-not ($Applied.Contains($_))) { Write-Host $_ $ExitCode = 1 } } Exit $ExitCode <!--NeedCopy-->
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论