How to Add Users to Active Directory Groups

In this guide, I will show you how to add users to Active Directory security groups using PowerShell, ADUC, and by using the Active Directory Group Management Tool. I will provide you with examples of adding a single user and multiple users to groups. 

Example 1: Add a Single User to a Group using PowerShell

Example 2: Add User to a Group Using Active Directory Users and Computers

Example 3: Bulk Add Users to a Single Group

Example 4: Add Users to Multiple Security Groups

Example 1: Add a Single User to a Group Using PowerShell

You can use the cmdlet Add-ADGroupMember to add users to an Active Directory group. 

In this example, I’m going to add a user Alma Martin to the AD security group IT_Local. Both the user and the group will be identified by their sAMAccountName. 

Here is the command: 

Add-ADGroupMember -Identity IT_Local -Members Alma.Martin

-Identity is the group and -members are the users you want to add to the group. 

You can verify the user was added by using the ADPrincipalGroupMembership cmdlet.

Get-ADPrincipalGroupMembership -Identity Alma.Martin

Yes, the command worked and the user was added to the IT_Local AD group. If you don’t like PowerShell then check out example 2. 

Example 2: Add User to a Group Using Active Directory Users and Computers

In this example, I will use the Active Directory Users and Computers GUI console to add a user to a security group. 

For this example, I will add user Alice Mills to the Accounting_folders security group. 

Open ADUC, open the user account and click on the “member of” tab. 

Next, click on the add button. 

You can type the full group name out or if you don’t remember it just type a partial name and click check names. I typed accounting and when I click check names it gives me a list of all the matching groups. 

It found three groups that have accounting in the name, I select the one I want and click ok. 

Click ok again. 

Click ok and you are done. 

You can confirm this by seeing the group listed in the members of tab for the user account. 

Example 3: Bulk Add Users to a Single Group

Adding one or two users into a group is very easy with PowerShell or ADUC but what about when you need to add a large list of users? ADUC has very limited options for bulk-adding users and PowerShell can be complicated for simple tasks like this. That is why I created the Bulk Group Management GUI tool. 

Let’s walk through an example. 

I’m going to add 300+ users to the “HR_Local” security group. 

Step 1: Open the “Group Management” Tool

Click here to download a free trial

Click on “CSV Template” and save the template. You can save it anywhere you like. 

Step 2: Setup the CSV File

Now just fill out the CSV file. 

Username = logon name of the users you want to add to a group.
memberof = the group name you want the user to be a member of.

Tip: Included with the AD Pro Toolkit is the “User Export tool“. This makes it easy to export all domain users, users from a group, or organizational unit. This can help you build the CSV file if you don’t already have a list of usernames. For example, I need a list of all the HR users, instead of manually typing them all out I can use the export tool to quickly get all the HR usernames.

Here is a screenshot of the User Export Tool. In this screenshot, I’m going to export all of the users from the HR folder and export their usernames. 

Step 3: Click the Run Button

When your CSV template is ready, select “add users to groups”, select your CSV file, and click run.

The tool will display the results and you can watch the progress in the log window. If there are any errors they will display in red. 

Let’s verify the users were added by using the Get-ADGroupMember PowerShell cmdlet. 

Get-ADGroupMember -Identity hr_local | select name

You can also verify with the Group Membership report tool. Select Group Report from the list, select your group, and click run. The tool will display all the members of the group.

This tool is included in the AD Pro Toolkit

Example 4: Add Users to Multiple Security Groups

So far I have shown you examples of adding single and multiple users to a single group. Now let’s look at an example of adding users to multiple Active Directory groups. 

I’m going to add users to the “HR_local”, “HR_Folders”, “Public_share1, and “Public_share2 at the same time. This is a huge time saver.

To add users to multiple groups just enter the group name in the memberof column and separate them with a comma.

Here is a screenshot of the CSV I have configured for this example. 

When your CSV template is ready open the group management tool.

Select “Add Users to Groups.

Select your CSV and click run.

That was easy. I just added 47 users to 4 different Active Directory groups and saved myself a lot of time.

You can use PowerShell, ADUC, or the Group Report tool to verify the group membership. 

I hope this article helped you find a solution for adding users to Active Directory Security Groups. This is a very common task for System Administrators and there are multiple ways it can be done. PowerShell is a popular choice for Active Directory management but for those that don’t have time to mess with scripts, there are some good GUI tools as an alternative. The AD Pro Toolkit is a very low-cost set of tools that help with many of the day to day Active Directory tasks. You can download a free trial and test it out in your environment. 

If you liked this article or have a question please post a comment below. 

Recommended Tool: Permissions Analyzer for Active Directory

Get instant visibility into user and group permissions in your Active Directory domain.

With Permissions Analyzer you can quickly view assigned and inherited permissions for any user or group.

Don’t let permission problems slow you down or put your data at risk. Get Permissions Analyzer for Active Directory today and take control of your permission management.

Download Free Tool

Leave a Comment