如何在 Azure 开发测试实验室 VM 上设置自动更新

How do I set Automatic Updates on Azure DevTest Lab VM

我在 Azure 开发测试实验室 运行 Windows Server 2016 中设置了一个 Windows VM,基于 Windows Server 2016 Datacenter Gallery 图像。这是作为 VSTS 的自定义生成代理。

我找不到如何将其设置为自动应用 Windows 更新。

我找到了这篇文章 https://social.technet.microsoft.com/Forums/windowsserver/en-US/0a46b8ac-0b16-4b87-a881-260c8d5609f7/disabling-windows-update-via-group-policy?forum=winserverGP,但服务器上不存在 Wuau.admin 模板。

本文 https://www.rootusers.com/configure-automatic-updates-for-windows-server-2016/ 引用了服务器管理器中的组策略编辑器工具...但 Azure VM 没有将其作为服务器管理器中的工具。本地 GPE 也没有文章中所示的树视图中的组策略管理部分。

我可能遗漏了一些非常简单的东西,但我对服务器管理并不是很熟悉。我的目标是设置 VM,以便它自己打补丁并 运行 顺利。

您可以使用 sconfig 将 Windows 更新设置设置为自动

Change your Windows Update Settings

To change your Windows Update Settings with SCONFIG, follow these steps:
•Open a command prompt with Admin permissions.
•Type sconfig and press Enter.
◦NOTE: There may be a short pause as the tool inspects your system.

•Press 5 and then Enter. This will bring up the following options for you to choose from:
◦(A)utomatic – This will configure your machine to automatically scan, download, install and reboot after applying any updates.
◦(D)ownloadOnly – This will automatically scan, download and notify the admin if updates need to be installed. This is the default setting on Windows Server 2016.
◦(M)anual — This turns Automatic Updates off. Your system will never check for updates.

•Press the letter specified in the “( )” and press Enter to apply.

•When the tool applies the configuration you have selected, you will see a message pop-up similar to the one below. Click the OK button to dismiss the message. The tool will refresh the menu and option 5 will now show the new configuration.

来源:https://blogs.technet.microsoft.com/mu/2016/10/25/__trashed/

根据 derape 的评论进行编辑