≡ Menu

Add user to domain group

If you are a domain admin, you may want to add new members to a domain/active directory group from command line.

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

Example:
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

Members
-------------------------------------------------------------------------------
Administrator            dave
The command completed successfully.

In this example case, the group name has whitespace in it, so we wrapped up the name in double quotes, so that the command reads the whole thing as the group name.

0 comments… add one

Leave a Comment