How to set password expiration on Windows 10 and Server 2016/2012 stand-alone servers. – wintips.org

If you want to set password expiration for accounts in Windows 10, continue reading below. It’s a good idea to change your password periodically in Windows 10 to ensure security.

Depending on your environment, it is a best practice to set a user’s password to expire after 30-90 days to prevent attackers from cracking the user’s password and gaining access to your computer and network resources.

How to change password expiration in Windows 10.

Method 1. Set password expiration through Group Policy
Method 2. Set the password expiration time using the command line


Method 1. Set password expiration through Group Policy. *

*Note: This method only works on Windows 10 Professional editions and Windows Server 2012 or Server 2016 standalone editions. Read this article to change or delete password expiration on domain server 2016/2012: How to change or delete password expiration in 2012/2016 domain.

Step 1. Enable password expiration.

1. Open the “Local Users and Groups” options. For this:

    1. press at the same time Windows image + R buttons to open the run command window.
    2. Type lusrmgr.msc and press Enter.

Open Local Users and Groups

2. Choose Users in the left pane, then right-click the user and click Characteristics.

Change user properties

3. Remove the mark Password never expires and press OK.

Set the password to never expire


Step 2. Set the maximum password age in the security policy.

1. Open the Local Security Policy Editor. For this: *

    1. press at the same time Windows image + R buttons to open the run command window.
    2. Type secpol.msc and press Enter.

Local security editor

2. Go to Local Security Policy:

  • Security settings -> Account policy -> Password Policy

3. In the right pane, double-click to open the policy: Maximum password age

Password Expiration Policy

4. Change the default value of “42” to the preferred period for the number of days you want the password to expire. *

*Note: This security setting specifies the amount of time (in days) that a password can be used before the system prompts the user to change the password. You can set passwords to expire after 1 to 999 days, or set the number of days to 0 and set passwords to never expire.

image


Method 2. Set the password expiration time using the command line. *

Note: This method works on all versions of Windows (Home & Pro) and Windows Server versions.

1. It’s open Command line as administrator. For this:

    1. Enter the following in the search field: cmd (or command line).
    2. right click on it command line (result) and select Run as administrator.

run command prompt as administrator

2. To enable password expiration, issue the following command at the command line:

*Note: In the above command, change the UserAccountName value with the name of the account for which you want the password to expire. For example, if the account name is “John”, the command would be:

Enable the password expiration command

3. Now issue the following command, set the password validity period to 90 days for example. *

*Note: Change in above command number “90” for the number of days you want the password to expire.

set maximum password age - command

4. Close the command prompt and restart the computer. *

*Note: After restarting, the user will be prompted to create a password if they do not already have one. Click OK at this point, enter the new password twice, and click OK Enter.

image

Additional help: If you want to remove password expiration, enter the following command at the Administrator command prompt to set the password for all your user accounts to never expire.

That’s it! Let me know if this guide helped you by leaving a comment about your experience. Please like and share this guide to help others.

If you found this article useful, please support us by donating. Even $1 can make a big difference for us We continue to help others while keeping this site free:

Leave a Comment