REM Get username and password from user’s input
set var1=%1
set var2=%2

REM Don’t allow user to change password
NET USER %var1% %var2% /add /expires:never /passwordchg:no

REM User’s password never expire
wmic useraccount where “Name=’%var1%'” set Passwordexpires=false

REM Add user to remote desktop group
NET localgroup “Remote Desktop Users” %var1% /add

REM Create user profile
runasspc.exe /program:”c:\windows\system32\reg.exe” /user:”%var1%” /password:”%var2%” /quiet


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s