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:

  1. Prepare two scripts and create a file

  2. Add two scripted tasks

  3. Configure the two scripted tasks

  4. View the task execution report

Prepare two scripts and create a file

  1. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:83 次

字数:1624

最后编辑:6年前

编辑次数:0 次

更多

友情链接

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文