What is the Command Line Syntax to create a Windows Local User and Add that User to a Local Group?

7,380

Something like:

net user username password /add

net localgroup groupname username /add
Share:
7,380
Kyle Brandt
Author by

Kyle Brandt

Updated on September 17, 2022

Comments

  • Kyle Brandt
    Kyle Brandt over 1 year

    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?

  • Kyle Brandt
    Kyle Brandt over 13 years
    net group says "This command can be used only on a Windows Domain Controller"
  • Dennis Williamson
    Dennis Williamson over 13 years
    @Kyle: Sorry, typo. See edit.
  • Kyle Brandt
    Kyle Brandt over 13 years
    Ah, came back to fix, you fixed it for me :-)
  • gWaldo
    gWaldo over 13 years
    Well played, sir. Beat me to it... +1 to you
  • Michael Haren
    Michael Haren over 11 years
    Add a /Y to answer yes to some prompts, e.g. complaints about the given password being too long for Win2k boxes