Everywhere I go, They always want to know how to control group memberships. So this is fairly well documented in a lot of places, but here it is again with the Adam twist on it.
Creating a Group Policy for controlling members of a group.
There are two scenarios to managing local groups on a computer.
- Allow the user to modify users of the local group and keep non managed users. In this scenario, a local administrator can add and remove users from the group. However, if they attempt to remove a user that is managed via the GPO, when the group policy is refreshed (about every 90 minutes), the user will be added back in.
- Allow the user to modify users of the local group and only allow managed users. In this scenario, if a local administrator modified the membership of a restricted group, those changes will be removed and only the settings from the group policy will take effect.
- In either scenario, you will want to disable the user configuration on the GPO
- As a local administrator of a machine a user can add or remove an account from a group regardless of what the GPO says. However, the GPO will enforce group membership
How to setup for scenario 1:
- Create a group policy
- Navigate to Computer Configuration\Policies\Windows Settings\Security Settings\Restricted Groups
- Right click in the setting window and choose newàgroup
- Enter the domain group that you want to add to the local group, for example silverspringnet\Domain Admins.
- You will then be prompted with the properties for that group
- In the lower box (this group is a member of) add the name of the local group you want the domain group to be a member of. The group must already exist on the target machine.
- If you remove a group, that group will be removed, unless the user has manually added it.
- If the user removes the domain group from the local group, the next time the policy is updated, the group will be added back in.
How to setup for scenario 2:
- Create a group policy
- Navigate to Computer Configuration\Policies\Windows Settings\Security Settings\Restricted Groups
- Right click in the setting window and choose newàgroup
- Enter the name of the local group, for example Power Users. The group must already exist on the target machine.
- You will then be prompted with the properties for that group
- In the upper box (members of this group) add the name of the domain group you want to be a member of the local group.
- If the user removes the domain group from the local group, the next time the policy is updated, the group will be added back in.
- If the user adds an account to that local group, next time the policy is updated the account they added will be removed, and the domain policy will be enforced.
- If you want to enforce no members of a group, leave the members of this group empty