Would you like to learn how to use a group policy to remove local administrators from the domain computers? In this tutorial, we are going to show you how to create a group policy to overwrite the local administrator group configuration on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7

Hardware List:

The following section presents the list of equipment used to create this tutorial.

Every piece of hardware listed above can be found at Amazon website.

Tutorial - Creating the GPO to overwrite local administrators

On the domain controller, create a group of users.

Windows group - LOCAL-ADMINS

Members of this group will be configured as administrators of every computer in the domain.

GPO - manage local administrators

On the domain controller, open the group policy management tool.

Windows 2012 - Group Policy Management

Create a new group policy.

Windows 2012 - Group Policy Objects

Enter a name for the new group policy.

GPO - Add local administrators

In our example, the new GPO was named: LOCAL ADMINISTRATORS.

On the Group Policy Management screen, expand the folder named Group Policy Objects.

Right-click your new Group Policy Object and select the Edit option.

GPO - Configure local administrators

On the group policy editor screen, expand the Computer configuration folder and locate the following item.

Copy to Clipboard

Right-click on local users and groups and select the option to add a group.

GPO - Remove local administrators

On the group configuration screen, use the following configuration.

• Action - Update.
• Group name - Select the local administrators group.
• Delete all users - Yes.
• Delete all groups - Yes.

GPO - Remove local admins

On the bottom part of the screen, click on the Add button.

• Add the local administrator account.
• Add the domain administrators group.
• Add the group we created named LOCAL-ADMINS.

Click on the OK button.

GPO - Local administrators remove

In our example, all members of the local administrators group will be removed.

The GPO will also automatically add the following members to the local administrators group:

• The local administrator account.
• The domain administrators group.
• The Active directory group named LOCAL-ADMINS.

To save the group policy configuration, you need to close the Group Policy editor.

Congratulations! You have finished the GPO creation.

Tutorial - Applying the GPO to remove local administrators

On the Group policy management screen, you need to right-click the Organizational Unit desired and select the option to link an existent GPO.

Windows-2012-Applocker application

In our example, we are going to link the group policy named LOCAL ADMINISTRATORS to the root of the domain.

Group policy object - Local adminstrators

After applying the GPO you need to wait for 10 or 20 minutes.

During this time the GPO will be replicated to other domain controllers.

To test the configuration, verify the members of the local administrator group on a remote computer.

Here is the local administrators group content, before our configuration.

Remove local admin using gpo

Here is the local administrators group content, after the GPO being applied.

Group policy - Remove local administrators

Congratulations, you removed local administrators using a GPO.