Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer
    
Got it, thank you! –  twblamer Jan 16 '12 at 16:44

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.