Windows Server 2008 R2: change account type from command line?

2

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.

twblamer

Posted 2012-01-16T06:50:35.403

Reputation: 163

Answers

0

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.

Richard

Posted 2012-01-16T06:50:35.403

Reputation: 8 152