I have a need to add a user to a Windows Server 2008 R2 box, and make that user an administrator. Basically, I want to automate the second step of this process:

1. net user MyUser password /add
2. Control Panel -> User Accounts -> Add or Remove user accounts -> MyUser -> Change the account type

Google is giving me pretty much nothing, but it's possible I'm not searching for the right terms.

Disclaimer: This is not anything I'm doing on a business production box, it's for a legacy application I need for development purposes.

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted
net group gropuname username /add

see net help group for more details. To make a user an administrator, they need to be a member of the machine's Administrators group.

link|improve this answer
Got it, thank you! – twblamer Jan 16 at 16:44
feedback

Your Answer

 
or
required, but never shown

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