Add User To Domain Group From Command Prompt

≡ Menu Windows Command Line Windows Commands, Batch files, Command prompt and PowerShell on July 6, 2017 Add user to domain group from command prompt by

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

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 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
  • Lutfulmanan Khan

    Thanx a lot!

    Reply Link
Cancel reply

Leave a Comment

Name *

Email *

Website

Comment

Current ye@r * Leave this field empty

More Recent Posts

  • Add new user account from command line (CMD)
  • Delete directory from command line [Rmdir]
  • TaskKill: Kill process from command line (CMD)
  • Kill Chrome from command line
  • Find windows OS version from command line
  • How to check if Windows 32 or 64 bit?
  • Get Windows install date
  • User questions about fixing javac not recognized error
  • How to Kill process from PowerShell
  • Fix WMIC invalid alias verb error

E-mail Newsletter

Categories

  • Automation (2)
  • Batch Files (9)
  • Command Line Errors (2)
  • Command prompt (3)
  • Directories (5)
  • Download (1)
  • Files (31)
  • Java (2)
  • Network (6)
  • PowerShell (5)
  • Remote access (7)
  • Run commands (28)
  • System Configuration (28)
  • System information (21)
  • Uncategorized (43)
  • User Accounts (23)
  • User Settings (9)
  • Windows Commands (34)
  • Windows shortcuts (4)
  • WMIC (1)

Tag » Add Computer To Ad Group Cmd