如何通过命令行更改组策略? [英] How to change group policy via command line?

查看:1028
本文介绍了如何通过命令行更改组策略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用命令行更新Windows服务器中的组策略。我不希望采用编程方式。我阅读了& ,然后尝试根据映射删除注册表项组策略和注册表项,但是组策略没有更新。

I want to update group policy in windows server using command line. I don't want programatic way. I read this & this, and then tried delete registry keys based on the mapping of group policy and registry keys, but the group policy didn't got updated.

特别是,我要设置计算机配置\管理模板\Windows组件\Windows更新\在组策略中将自动更新配置为未配置

Specifically, I want to set Computer Configuration\Administrative Templates\Windows Components\Windows Update\Configure Automatic Updates to Not configured in group policy.

所以,我运行了以下命令,

So, I ran following commands,

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v ScheduledInstallTime /f
The operation completed successfully.

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v ScheduledInstallDay /f
The operation completed successfully.

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v NoAutoUpdate /f
The operation completed successfully.

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v AUOptions /f
The operation completed successfully.

但此后,组策略未更新。我是否需要运行另一个命令来将注册表更改传播到组策略?如果是,那是什么?我想念什么?

But after that the group policy wasn't updated. Do I need to run another command to propagate my registry changes to group policy? If yes, what is it? What am I missing?

我尝试了, gpupdate / force ,它覆盖了我的注册表更改。我需要与此相反。

I tried, gpupdate /force, it overrided my registry changes. I need converse of this.

推荐答案

如何从命令行更改组策略?瞧:

How to change group policy from the command line? Voila:

LGPO.exe –本地组策略对象实用程序,v1.0

这篇关于如何通过命令行更改组策略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆