C:\Users\Raj>net accounts Force user logoff how long after time expires?: Never Minimum password age (days): 0 Maximum password age (days): 42 Minimum password length: 0 Length of password history maintained: None Lockout threshold: Never Lockout duration (minutes): 30 Lockout observation window (minutes): 30 Computer role: WORKSTATION The command completed successfully.To change the minimum password length, here is the command.
net accounts /MINPWLEN:8The above command sets the password length to 8 How to set a never expiry password
net accounts /MAXPWAGE:UNLIMITEDHow to set a password expiry days.
net accounts /MAXPWAGE:60The above command sets the password expiry date to 60 days. Thank you for reading this article, if you have any questions please let us know. Thank you for visiting my site, for any scripts in these articles you are testing please make sure you have tested this script in our lower environment before you run in production.