none
Add domain user to local group by command line

    Question

  • I try the following command to add a domain user into local Administrators group of my Windows 7 computer and my computer has already joined domain.

    net localgroup administrators mydomain.local\user1 /add /domain

    It returns successful added, but I don't find it in the local Administrators group.

    How can I do it?

    Thanks,

    Joe.


    Tuesday, March 13, 2012 10:41 AM

Answers

All replies

  • Because you are using the /domain parameter you are executing the command on the PDC instead of on the local computer. Try this command:

    net localgroup administrators mydomain.local\user1 /add

    More information: http://technet.microsoft.com/en-us/library/cc725622(v=ws.10).aspx

    Tuesday, March 13, 2012 11:54 AM
  •  

    Hi,

    I am just writing to check the status of this thread. Was the information provided in previous reply helpful to you? Do you have any further questions or concerns? Please feel free to let us know.

    Regards,

    Alex Zhao

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.


    Alex Zhao

    TechNet Community Support

    Tuesday, March 20, 2012 2:44 AM
  •  

    Hi,

    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps should be helpful for many similar scenarios. If the issue still persists, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.

    BTW, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks for your understanding and efforts.

    Regards,

    Alex Zhao

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.


    Alex Zhao

    TechNet Community Support

    Tuesday, March 27, 2012 7:33 AM
  • Just FYI, if you directly log in to Domain Controller, you can use 'net group' to manage groups in Active Directory.

    Syntax is the same with 'net localgroup'

    Have fun,


    Thursday, February 14, 2013 6:46 AM
  • I'm trying to do the same with Windows 7 computer and Windows Server 2012 Essentials. I get there is no such global user or group:mydomain.local\user.

    note this PC is not joined to the domain for various reasons.

    Monday, September 09, 2013 12:14 AM