In this article, you will learn how to configure password expiration in Windows using command line. All the versions of Windows have this method available.
Follow the steps –
- Click on the “Start” button and click on “Run”.
- You can also use the shortcut key “Windows+R”.
- Type “cmd” in the run box and press enter key to open the command line interface.
- If the command prompt program appears on the left-hand side of the screen, you have the option to launch it as an Administrator.
- To enable password expiration on Windows 7, 8, or 8.1, execute the following command and then press Enter-
wmic path Win32_UserAccount where Name='username' set PasswordExpires=true
- To disable password expiration on Windows 7, 8, or 8.1, execute the following command and press Enter-
wmic path Win32_UserAccount where Name='username' set PasswordExpires=false
Important note- For this procedure, please ensure that you replace “username” in the command with the corresponding user account name.
That is it!
For more tips on managing your Windows Server, Read How to change the product key on a windows server through CMD
Hope you liked our article. For more updates, do visit our KB section regularly.