gpt4 book ai didi

powershell - 使用 powershell 禁用自动更新 (2012R2)

转载 作者:行者123 更新时间:2023-12-03 11:27:12 24 4
gpt4 key购买 nike

我看到了一些相关的问题,但没有一个解决方案对我不起作用。
我有 windows server 2012R2,我需要使用 Powershell v5.0 或批处理禁用它的自动 windows 更新(首选 Powershell)。

我可以手动操作,打开 gpedit.msc , 导航到 Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update然后更改 Configure Automatic UpdatesDisable .

如何自动完成 没有 使用外部 powershell 模块(例如 PolicyFileEditor )。

是否有等效的注册表项可以更改它可以完成工作?我知道 Windows server 2008 有一个,但我使用的是 2012R2。

最佳答案

这是full list用于 Windows 更新的 reg 键供引用,但如果您设置了 HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate1这将禁用 Windows 更新。

您可以使用New-ItemProperty使用 PowerShell 设置此值

关于powershell - 使用 powershell 禁用自动更新 (2012R2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48058596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com