Sign in with
Sign up | Sign in
Your question

Commandline set User Password to never expire

Last response: in Windows XP
March 20, 2012 7:52:26 PM

Hi, I was wondering if anyone knew a command to set local user's account's password to never expire.

This can be easily done through GUI by using a check-box, but that is not easy to script (have to use autokey and stuff...).

"net user" seems to allow the account to never expire, but I don't see an option to have the password set to never expire.

September 21, 2012 5:57:50 PM

Just go there paste the code in a vb script and fire the script
it worked great for me i was search for a way to tick that damn option for several users
Related resources
September 21, 2012 6:10:24 PM

Why not just go into the local policy editor and set the "maximum password age" to zero. This will prevent all passwords from expiring.
September 22, 2012 12:24:35 PM

net user youruername /expires:never