Skip to main content




Turn password expiration on or off in Windows 10: If password expiration is turned on for local accounts in Windows 10, after the expiration time has expired, Windows will alert you to change your password, which is very annoying. By default, the Password Expiration feature is disabled, but some third-party program or application might enable this feature, and unfortunately there is no interface in the Control Panel to disable it. The main problem is the constant change of the password, which in some cases leads to forgetting the password.

password-policy-in-gpedit-maximum-and-minimum-password-age-1-7149422

Although Microsoft makes it impossible for Windows users to change password expiration settings for local accounts, there is still a solution that works for most users. Windows Pro users can easily change these settings through the Group Policy Editor, while home users can use the Command Prompt to customize password expiration settings. So, without wasting any time, let's see how to enable or disable password expiration in Windows 10 with the help of the guide given below.

Enable or disable password expiration in Windows 10

Make sure to create a restore point in case something goes wrong.

Method 1: Enable or disable password expiration for local account using command prompt

Enable password expiration in Windows 10

1.Press Windows key + X and then select Command Prompt (Admin).

command-prompt-admin-1-18-7962059

2. Type the following command and hit Enter:

wmic UserAccount where Name = »Username» set PasswordExpires = True

Note: Replace the username with the actual username for your account.

wmic-useraccount-where-nameusername-set-passwordexpirestrue-7368555

3.To change the minimum and maximum password age for Local Accounts, type the following in cmd and press Enter:

net accounts

Note: Make a note of the current maximum and minimum age of the password.

make-note-of-the-current-maximum-and-minimum-password-age-8509170

4.Now type the following command and press Enter, but make sure to remember that the minimum age of the password must be less than the maximum age of the password ..:

net accounts / maxpwage: days Note: Replace the days with a number between 1 and 999 to find out how many days the password expires.

net accounts / minpwage: days Note: Replace the days with a number between 1 and 999 to find out how many days after a password can be changed.

set-minimum-and-maximum-password-age-in-command-prompt-3689048

5.Close cmd and restart your PC to save the changes.

Disable password protection in Windows 10

1.Press Windows key + X and then select Command Prompt (Admin).

command-prompt-admin-1-18-7962059

2. Type the following command and hit Enter:

wmic UserAccount where Name = »Username» set PasswordExpires = False

disable-password-protection-in-windows-10-1-2089947

Note: Replace the username with the actual username for your account.

3.If you want to disable password expiration for all user accounts, then use this command:

wmic UserAccount set PasswordExpires = False

4.Restart your PC to save the changes.

This is how to enable or disable password expiration in Windows 10 via command prompt.

Method 2: Enable or disable password expiration for local account using Group Policy Editor

Enable password expiration for local account

Note: This method will only apply to Windows 10 Pro, Enterprise, and Education editions.

1.Press Windows key + R, then type gpedit.msc and press Enter.

gpedit-msc-in-run-2-6607232

2.In the left pane of the window, expand Local Users and Groups (Local) and select Users.

3.Now, in the right pane of the window, right-click the user account whose password has expired and select Properties.

right-click-on-the-user-account-whose-password-expiration-you-want-to-enable-then-select-properties-1-1349165

4. Make sure you are on the General tab, then uncheck the Password never expires box and click OK.

uncheck-password-never-expires-box-8239771

5.Now press Windows key + R, then type secpol.msc and hit Enter.

6.In Local Security Policy, expand Security Settings> Account Policies> Password Policy.

password-policy-in-gpedit-maximum-and-minimum-password-age-6376119

7.Select Password Policy and then in the right pane of the window double-click on Maximum password age.

8.Now you can set the maximum password age, just enter any number between 0 and 998 and click OK.

set-maximum-password-age-1535907

5.Restart your PC to save the changes.

Disable password expiration for local account

1.Press Windows key + R, then type gpedit.msc and press Enter.

gpedit-msc-in-run-2-6607232

2.In the left pane of the window, expand Local Users and Groups (Local) and select Users.

right-click-on-the-user-account-whose-password-expiration-you-want-to-enable-then-select-properties-1-1349165

3.Now in the right pane of the window, right-click the user account whose password you want to enable. select Properties.

4. Make sure you're on the General tab, then check the Password that never expires box and click OK.

checkmark-password-never-expires-box-2812558

5.Restart your PC to save the changes.

That's all you've learned about how to enable or disable password expiration in Windows 10, but if you still have any questions about this guide, feel free to ask in the comment section.

R Marketing Digital