Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is the command line syntax to create a windows local user and add that user to a local group?

Can I do it with something short and simple with net commands?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

Something like:

net user username password /add

net localgroup groupname username /add
share|improve this answer
    
net group says "This command can be used only on a Windows Domain Controller" –  Kyle Brandt Sep 27 '10 at 19:08
    
@Kyle: Sorry, typo. See edit. –  Dennis Williamson Sep 27 '10 at 19:10
    
Ah, came back to fix, you fixed it for me :-) –  Kyle Brandt Sep 27 '10 at 19:11
    
Well played, sir. Beat me to it... +1 to you –  gWaldo Sep 27 '10 at 19:12
    
Add a /Y to answer yes to some prompts, e.g. complaints about the given password being too long for Win2k boxes –  Michael Haren Feb 8 '13 at 20:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.