Created
November 27, 2019 03:01
-
-
Save flatlinebb/a5bef45add52252485fdf8fa11f17a35 to your computer and use it in GitHub Desktop.
Set user password to never expire in command line
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
Password never expire for a specific user using command-line | |
Open command-prompt with administrative privileges and run the following command sequence: | |
Get the name of users currently active on the system using this command: net accounts | |
Run the following command: | |
wmic useraccount where �Name=�itechticsuser'� set PasswordExpires=false | |
Replace �itechticsuser� with the name of user you want to configure. | |
Password never expire for all users using command-line | |
Open command-prompt with administrative privileges and run the following command: | |
net accounts /maxpwage:unlimited | |
3 Ways To Set Windows Local User Account Passwords To Never Expire 1 | |
Configure password expiration using PowerShell | |
You can achieve the same results using PowerShell | |
Password never expire for a specific user using PowerShell | |
Press Windows Key + X + A keyboard shortcut sequence to open PowerShell with administrative privileges. | |
Run the following command: | |
Set-LocalUser -Name �itechticsuser� -PasswordNeverExpires 1 | |
Replace itechticsuser with your desired username. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment