How to change group policy via command line?

前端 未结 3 1854
花落未央
花落未央 2021-01-01 02:20

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 b

3条回答
  •  清歌不尽
    2021-01-01 02:56

    For group policy objects in a domain, registry-based group policy settings can be configured from the command line using Powershell. If you are not running on a domain controller, the Group Policy Management Console must be installed.

    See Group Policy Cmdlets in Windows PowerShell and in particular the Set-GPRegistryValue cmdlet.

    You can of course run a Powershell command from the legacy command line, e.g.,

    powershell get-gpregistryvalue -Name gpo-name -Key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -ValueName AUOptions
    

    As far as I know, there is no command-line solution for local group policy. For local group policy, see Glenn's answer.

提交回复
热议问题