Quickly edit a GPO

by Mitch Tulloch [Published on 22 July 2009 / Last Updated on 6 March 2009]

Gpedit.msc has some command-line options that let you quickly edit targeted Group Policy OPbjects.

Gpedit.msc, the Group Policy Object Editor, has some command-line options that let you quickly edit targeted Group Policy Objects. For example, to view the Local Group Policy Object (LGPO) settings on a member server named SRV22 in the CONTOSO domain, do this:

gpedit.msc /gpcomputer:"SRV22.contoso.com"

You can also open a domain GPO from the command line provided you know the globally unique identifier (GUID) of the GPO. To determine the GUID of a GPO, open Group Policy Management from Administrative Tools, select the GPO, and select the Details tab. For example, the GUID of the Default Domain Policy GPO is always {31B2F340-016D-11D2-945F-00C04FB984F9}.

Once you know the GUID of a GPO, you can open the GPO for editing from the command-line as follows:

gpedit.msc /gpobject:"LDAP://CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=contoso,DC=com"

Once you've verified this works, you can create a shortcut for this command, name the shortcut "Edit the Default Domain GPO" and save the shortcut on your desktop. Then whenever you need to edit this GPO you simply double-click on the shortcut.

Featured Links