Skip to main content

GPO: Maintain the Domain Admins group or other groups as local administrators within computers.

Situation.

This is something I’ve seen in different places: sometimes, certain users with administrator privileges on a domain-joined computer delete the Domain Admins group or other groups required by the organization, whether for checking the computer’s status or for deploying software like SCCM.

One of the basic rules is: Never make users local administrators. However, if it’s necessary and you want to ensure that the desired group always has local administrator privileges on your computer, the solution is to apply a Group Policy Object (GPO) to handle this automatically. It doesn’t matter if the user deletes the local administrator group(s) from their computer; when a GPO is applied, it will automatically add the required groups back to the computer’s administrators group.

The solution is as follows:

Description of Step 1

Within Group Policy Management:

  1. Expand the domain.

  2. Right-click on Group Policy Objects.

  3. Select New.

Description of Step 1

Select the desired name.

Description of Step 1

Select the created GPO, right-click, and select Edit.

Description of Step 1

Within the editor:

  1. Expand Computer Configuration

  2. Expand Preferences

  3. Expand Control Panel Settings

  4. Right-click on Local Users and Groups, select New, and then Local Group

Description of Step 1

Within the Local Users and Groups editor:

  1. Select the Update action

  2. Select Administrators (built-in)

  3. Select Add

  4. Click on the ellipsis (…)

  5. Verify that the Location field contains your domain name, then add the desired group. Note: Multiple groups can be added, separated by semicolons (;).

Description of Step 1

Once the groups are added, simply click OK.

Description of Step 1

Once the GPO is created and edited, we can proceed to create a link between the GPO and the OU to which we want to apply it. To do this, simply select the OU of your choice, right-click, and select “Link an Existing GPO…”

Description of Step 1

Select the GPO we just created.

Description of Step 1

Now we can test it on our computer. To do this, I have removed the “domain admins” group from my local administrators group, as shown in the image.

Description of Step 1

For this test, I forced the update of my domain policies using the command:

gpupdate /force

Description of Step 1