Created
March 16, 2017 19:17
-
-
Save te-online/877858c398b752116ffcf0c56ddcaf61 to your computer and use it in GitHub Desktop.
MDT Script Series: Create user accounts from powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
net user "admin" "ADMINPASS" /add /fullname:"admin" | |
net localgroup "Administrators" "admin" /add | |
WMIC USERACCOUNT WHERE "Name='admin'" SET PasswordExpires=FALSE | |
net user "Student" "STUDENTPASS" /add /fullname:"Student's Account" | |
net localgroup "Users" "Student" /add | |
WMIC USERACCOUNT WHERE "Name='Student'" SET PasswordExpires=FALSE | |
WMIC USERACCOUNT WHERE "Name='Student'" SET Passwordchangeable=FALSE | |
net user "Teacher" "TEACHERPASS" /add /fullname:"Teacher's Account" | |
net localgroup "Users" "Teacher" /add | |
WMIC USERACCOUNT WHERE "Name='Teacher'" SET PasswordExpires=FALSE | |
WMIC USERACCOUNT WHERE "Name='Teacher'" SET Passwordchangeable=FALSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment