Navigation

9/24/2018

creating user via command line




To add local user account via command Line, that never expires and user can not change:


net user John thePassWord /ADD  /passwordchg:NO
 
WMIC USERACCOUNT WHERE "Name='John'" SET PasswordExpires=FALSE 
 
 



To add that user to Adminstrator group:

net localgroup "Administrators" John /add
 
 
 
 
https://www.lifewire.com/net-user-command-2618097 
 
https://serverfault.com/questions/434717/how-to-create-a-never-expiring-password-user-via-net-user-through-bat-file 


No comments:

Post a Comment