How to change group policy via command line?

前端 未结 3 1846
花落未央
花落未央 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:39

    Set-GPRegistryValue is the way to go here. The problem, which is common, is that you have the GP path and you need to raw data. You can get the raw data (Keypath and value) from the settings spreadsheet, from the ADMX file (if administrative template setting) or from a free tool call registry.pol viewer from GPOGuy.

    The commands you put up clean up registry data, these cmdlets don't do that. They add values to the registry.pol file (or registry.xml for GP Preference) stored in the GPO. Those settings are then sent down to target systems and applied to registry. Also, for non-registry based policy and ability to automate settings across local policies search "Group Policy Automation" there is a solution out there you may want to look at.

提交回复
热议问题