You want to modify the settings associated with a GPO.
18.104.22.168 Using a graphical user interface
22.214.171.124 Using a command-line interface or VBScript
You cannot modify the settings of a GPO with any of the command-line tools or APIs, but you can copy and import settings as described in Recipe 9.3 and Recipe 9.7.
The one function that the GPMC tool and API cannot do is modify GPO settings. This still must be done from within the GPOE. You can, however, launch GPOE from within GPMC as described in the GUI solution. Not having a scriptable way to modify GPO settings has been a big roadblock with managing GPOs, especially across multiple forests. Copying or importing GPOs can help with migrating settings across forests.
9.6.4 See Also
Recipe 9.3 for copying a GPO, Recipe 9.5 for viewing the settings of a GPO, and Recipe 9.7 for importing a GPO