The Categorizer

the categorizer logo

How To Enable or Disable Password Expiration in Windows 11


In some versions of Windows, the password expiry limit is set, after which the user is mandatorily required to change the password. To solve this, Password Expiration settings is the built-in Windows feature that allows the users to manage the password expiry timings.

It seems that you’re tired of password expiration notifications on your computer prompting repeatedly or simply want to enable password expiry reminders to change your password from time to time.

By the end of this article, you’ll be able to enable or disable password expiration in Windows 11:


Note: This method doesn’t work in Windows 11 Home Edition.

Step 1: In the Start menu, search for Computer Management and hit the enter key or press the “Windows key + R” key combination to open Windows Run, type: “compmgmt.msc” and open it.

computer management app icon
Computer Management App Icon

Step 2: Expand the Local Users and Group section on the left sidebar and select the “Users” button. On the right-pane, double-click the user for which you want to enable or disable password expiration.

click the users option in the local users and groups
Users option

Step 3: To disable the password expiration, check the “Password never expires” option, uncheck it if you want to keep it enabled, and click the “Apply” button.

check the "prevent password expiration" option and press the apply button
“Prevent Password Expiration” option

Note: This method doesn’t work in Windows 11 Home Edition since this version of Windows doesn’t include Group Policy by default.

Step 1: In the Start menu, search for Edit Group Policy and hit the enter key or open the Windows Run, search for “gpedit.msc“.

local group policy app icon in windows 11
Group Policy App

Step 2: Navigate to the following path:
Computer Configuration > Windows Settings > Security Settings > Account Policies > Password Policy and double-click the “Maximum Password Age” option.

Step 3: By default, you’ll see the password expiry value set to 42.
To disable the password expiry, change the value from 42 to 0.
To enable the password expiry, set the value from 42 to the preferred value (in days) after which you want to change the password.

set maximum password age to 0 in password policy to disable password expiry in windows
“Maximum Password Age” option

Step 4: To make the changes take effect without restarting your PC, run the Command Prompt as administrator from the Start menu and type the command: gpupdate /force.

update local group policy command after resetting group policy in windows 11
Update Local Group Policy Command

Note: This security setting determines the period of time (in days) that a password can be used before the system requires the user to change it. You can set passwords to expire after a number of days between 1 and 999, or you can specify that passwords never expire by setting the number of days to 0.

It is a security best practice to have passwords expire every 30 to 90 days, depending on your environment. This way, an attacker has a limited amount of time in which to crack a user’s password and have access to your network resources.


Step 1: Run the Command Prompt as an administrator from the Start menu.

command prompt icon in windows 11
Command Prompt (CMD) Icon

Step 2: To list all the user accounts on your computer, type the command: net user.

command to list all users in windows using command prompt
Command To List All Users

Step 3: To enable password expiration, type the command:
WMIC USERACCOUNT WHERE Name=’Account-UserName’ SET PasswordExpires=TRUE.
To disable password expiration, type the command:
WMIC USERACCOUNT WHERE Name=’Account-UserName’ SET PasswordExpires=FALSE and the password will not expire.

command to enable or disable password expiration in windows using command prompt
Command To Enable or Disable Password Expiration

Note: Replace the Account-UserName with the actual account name on your computer.


Step 1: Run the PowerShell as an administrator from the Start menu.

powershell app icon in windows 11
PowerShell App Icon

Step 2: To list all the user accounts on your computer, type the command: net user.

command to list all users in windows using PowerShell
Command To List All Users

Step 3: To enable password expiry, type the command:
Set-LocalUser -Name “Account-UserName” -PasswordNeverExpires 0.
To disable password expiry, type the command:
Set-LocalUser -Name “Account-UserName” -PasswordNeverExpires 1 and your password will not expire.

command to enable or disable password expiration in windows using PowerShell
Command to Enable or Disable Password Expiration

Note: Replace the Account-UserName with the actual username on your computer.


Next Steps

We’ve covered how to disable and enable Password Expiration in Windows 11.

Depending on your requirements, you can either enable or disable the password expiry settings and their notifications.

Further, configure your device’s settings by referring to the related articles below.


how to show wifi password in windows

Check WiFi Password in Windows

Forgot your network’s password? Learn how to find Network’s Password stored in Windows.

how to disable notifications in windows

Disable Notifications in Windows 11

Disable the notification popping up on the screen randomly in Windows OS.

how to disable bitlocker in windowhow to disable BitLocker in windows

Disable BitLocker on Windows 11

Turn off the BitLocker Services to save some memory being consumed in the background.

how to use credential manager in windows

Use Credential Manager in Windows 11

Manage all your usernames, passwords, and authentication keys using the built-in Credential Manager in Windows.

Take a Minute to Share This Article.
Show / Hide System Tray Icons in Windows