How to configure Users permissions in Windows Server 2008 R2 by command line?

Posted by Répás on Server Fault See other posts from Server Fault or by Répás
Published on 2012-10-26T14:28:40Z Indexed on 2012/11/12 17:04 UTC
Read the original article Hit count: 245

I have to create about 800 users in our Windows S 2008 R2 and I'd like to make a few settings with them.

  1. Create user: net user Joe 1mb4pASs /add /fullname:"John Smith" /passwordchg:no /comment:"no comment"

  2. Set never expired password: wmic useraccount where "Name='Joe'" set PasswordExpires=FALSE

  3. Add the user to two groups (like in the Members Of tab in the GUI)

    • Remote Desktop Users
    • (I translated it from hungarian, because the server) Terminal Services - Computers to enable the use of applications via webaccess

Step 3 is where I'm having problems. What command(s) should I use for this?

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about command-line