≡ Menu

Add user to domain group from command prompt

If you are a domain administrator and looking to add users to domain  or active directory group from command prompt, this post shows you how to do that with net group command.

Execute the below steps to add users to domain group.

  1. Open command prompt
  2. Run the below command
    net group groupName userName /ADD /DOMAIN

To add a user named ‘dave’ to the domain group “Domain Admins”

C:\>net group "Domain Admins" testuser /ADD /DOMAIN
The command completed successfully.

Now list the members of the domain group.

C:\>net group "Domain Admins"
Group name     Domain Admins
Comment        Designated administrators of the domain

Administrator            dave
The command completed successfully.

In this example case, the group name has white space in it, that’s why it’s wrapped up double quotes, so that the command reads the whole thing as as group name.

1 comment… add one

Leave a Comment