我看到了一些相关的问题,但没有一个解决方案对我不起作用。
我有 windows server 2012R2,我需要使用 Powershell v5.0 或批处理禁用它的自动 windows 更新(首选 Powershell)。
我可以手动操作,打开 gpedit.msc
, 导航到 Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update
然后更改 Configure Automatic Updates
至Disable
.
如何自动完成 没有 使用外部 powershell 模块(例如 PolicyFileEditor
)。
是否有等效的注册表项可以更改它可以完成工作?我知道 Windows server 2008 有一个,但我使用的是 2012R2。
请您参考如下方法:
这是full list用于 Windows 更新的 reg 键供引用,但如果您设置了 HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
至1
这将禁用 Windows 更新。
您可以使用New-ItemProperty使用 PowerShell 设置此值