How To Configure Password Age for Local Accounts in Windows 10 and Windows 11

How to Configure Password Age for Local Accounts in Windows blog banner image

This step-by-step guide demonstrates how to configure password age in Windows 10 and Windows 11. It includes instructions for changing the maximum password age and minimum password age using Local Security Policy and the Command Prompt.

Changing password expiration security settings in Windows 10 and Windows 11 can help secure your home and small business devices by preventing the use of old passwords that may have leaked and encouraging your family and colleagues to follow good security practices.

Step-by-step instructions for configuring password age for local accounts in Windows 10 and 11

Prerequisites for changing password expiry in Windows

To change the minimum and maximum password age settings, you must be logged in as an administrator and have password expiration enabled.

Note:  the methods below that use the Local Security Policy are only available in the Pro and Enterprise versions of Windows 10 and Windows 11. Home users can only use the Command Prompt instructions.

What is password expiration in Windows?

Password expiration forces users to change their passwords when the current password has reached a configured minimum or maximum age. Password expiration is disabled by default in Windows 10 and Windows 11.

What is the minimum password age?

The minimum password age is the number of days that a password must be used before a user is allowed to change it. This prevents users from changing passwords too frequently.

In Windows 10 and Windows 11, the minimum password age can be configured between 0 and 998 days. The minimum password age must always be less than the maximum password age, unless the latter is set to 0 (meaning that passwords never expire). Setting the minimum password age to 0 (the default) means that the user can change their password as frequently as they wish.

Configuring minimum password age using Local Security Policy

Follow these steps to set the minimum password age in Windows 10 and Windows 11:

  • Right-click on the Start button and click Run
  • Enter secpol.msc in the Run dialog and press OK
  • Under Security Settings in the navigation tree in the left panel, click Account Policies and then Password Policy

Configuring minimum password age using Local Security Policy

  • In the policy list in the right panel, double-click the Minimum password age policy
  • Enter a value between 0 and 998 (the number of days that should apply) and then press OK to confirm the change

Minimum password age properties

 

Configuring minimum password age using the Command Prompt

To configure the minimum password age for a user in Windows 10 or Windows 11 using the command Prompt or PowerShell, enter the following command: net accounts /minpwage:NUMBER

Replace NUMBER with the number of days for the minimum password age. Note that you must run this command using an elevated (administrative) Command Prompt or PowerShell session.

What is the maximum password age (expiry)?

The maximum password age specifies how many days a password can be used before the user is forced to change it. This can have a value between 0 and 999 days. If the maximum password age is set to zero, the password never expires. When set to 0, any minimum password age between 0 and 998 can be configured.

The default maximum password age in Windows 10 and Windows 11 is 42 days — however, it’s worth noting that this default only applies once password expiration is enabled — when it is disabled, the minimum and maximum settings are ignored and passwords will never expire.

Configuring maximum password age using Local Security Policy

The steps for setting the maximum password age are largely the same, except you change the Maximum password age (with a value between 0 and 999) policy instead of the Minimum password age policy in the Local Security Policy editor.

Configuring maximum password age using the Command Prompt

To set the maximum password age from the Command Prompt or PowerShell, enter the following command in an elevated (administrative) prompt: net accounts /maxpwage:NUMBER

Again, replace NUMBER with the number of days you want to set for the maximum password age.

Use cases and practical scenarios

Configuring password age settings for local accounts in Windows 10 and Windows 11 is useful for home users and small businesses who do not use a Windows Domain to centralize the configuration of Windows security settings.

Setting password expiry limits ensures that old passwords that may have been part of a breach are not in continued use. Password expiry may also be a requirement for compliance with security standards such as Payment Card Industry Data Security Standard (PCI DSS), which stipulates that user passwords must be changed every 90 days.

Recommendations and troubleshooting

You can view the currently configured minimum and maximum password ages from the Command Prompt or PowerShell by running the following command: net accounts

 view the currently configured minimum and maximum password ages from the Command Prompt or PowerShell

If you have recently changed your password policies, you can force users to change their passwords on the next login. If you want to reset the minimum and maximum password ages to their defaults, you can reset all Local Security Policy settings.

You should set your password expiry policies to reflect the requirements your business needs to meet legal regulations or industry standards.

However, be aware that forcing users to change their passwords too frequently may have the opposite of the intended effect. They may resort to simpler passwords, writing down passwords to remember them, or simply recycling old passwords and appending a number to the end (something attackers will certainly try as well).

Managing password security policies in critical enterprise environments

Configuring password age minimum and maximum in Windows 10 and Windows 11 can help with compliance, but is not considered best practice, and may lead to a false sense of security for users.

Your IT infrastructure and the data it holds are critical to the survival of your business, and must be protected by robust security mechanisms including security and password policies. NinjaOne provides a unified endpoint management platform for managing your entire IT deployment, from servers to user devices, which lets you manage security settings and monitor for suspicious activity.

 

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

Learn more about Ninja Endpoint Management, check out a live tour, or start your free trial of the NinjaOne platform.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).