How to Enable or Disable Password Expiration in Windows 11
- 7 steps
- Needs administrator rights
Password expiration in Windows 11 is set per account. You turn it on or off with Local Users and Groups, Command Prompt, PowerShell or the Microsoft account website. Local Users and Groups (a built-in tool for managing accounts on the computer) is the quickest route on Windows 11 Pro.
By default, a local account must change its password after 42 days, which is the maximum password age. Setting Password never expires stops Windows from demanding a new password at an awkward moment.
Disabling expiration for one user does not affect the others unless you use the “all accounts” version of the command.
To turn off password expiration in Windows 11, open Local Users and Groups by pressing Win plus R, typing lusrmgr.msc and pressing Enter. Open the Users folder, double-click the account, and tick Password never expires on the General tab. Click OK; the change applies immediately. Windows 11 Home lacks this tool, so use Command Prompt or PowerShell instead.
Why Password Expiration Matters
Password expiration is a security feature. If someone steals your login details, a forced change limits how long the stolen password stays useful. Turning it off makes sense if you manage your own PC and find the regular prompts a nuisance. On a shared or work machine, check with whoever sets the security policy first.
Two settings control how password expiry works:
- Maximum password age is how many days pass before Windows requires a new password. The default for local accounts is 42 days.
- Minimum password age is how long a password must be in use before it can be changed again. The default for local accounts is 0 days, so you can change it at any time.
The 42-day limit only affects a local account that does not have Password never expires set. That is why the per-account setting is the one that matters most. If Windows already says your password has expired, you have to set a new one at the sign-in screen before you can change anything.
Microsoft accounts work differently. Their default expiration cycle is 72 days, and you set it online rather than in Windows (see Option Four).
Option One
Enable or Disable Password Expiration for Local Account in Local Users and Groups
Local Users and Groups lets you change password expiration for individual accounts in a normal window, with no commands to type. To open it, press the Win plus R, type lusrmgr.msc and press Enter.
These steps make a local account’s password never expire, or turn password expiration back on for it.
- Open Local Users and Groups with
lusrmgr.msc. Sign in as an administrator first. The Local Users and Groups window opens. - Click the Users folder in the left panel. Your local accounts appear in the middle panel.
- Double-click the local account you want to change. Its properties window opens.
- Set Password never expires on the General tab. Check the box to disable expiration, or uncheck it to enable expiration.
Note: Password never expires is grayed out while User must change password at next logon is checked. Uncheck that box first, and the other option becomes available.
- Click OK. The properties window closes and the setting is saved.
- Change the maximum and minimum password age if you want. These are system-wide limits that apply to all local accounts, not just the one you picked.
- Close Local Users and Groups. No restart or sign-out is needed, because the change applies straight away.
That’s it. The account now follows the expiration setting you chose. To undo it, reopen the account and flip the checkbox back.


Option Two
Enable or Disable Password Expiration for Local Account in Command Prompt
⚠️ Requires admin privileges
This method works on every edition of Windows 11, including Home. You run the commands from an elevated terminal, meaning one opened with administrator rights.
The commands use WMIC (the Windows Management Instrumentation command-line tool), which Microsoft has deprecated. On newer Windows 11 builds, such as 24H2, WMIC may not be installed. If Command Prompt says the command is not recognized, use Option Three (PowerShell) instead.
These first steps open an administrator Command Prompt, which both the enable and disable commands below need.
- Open Windows Terminal (Admin), and select Command Prompt. Right-click the Start button and choose the Terminal (Admin) entry, then click Yes if User Account Control asks. A Command Prompt tab opens with administrator rights.
Enable Password Expiration for Local Account(s)
This part turns password expiration back on for your local accounts, so Windows asks for a new password once the maximum age passes. You can apply it to every local account at once or to one account only.
- Type one of the commands below into the Command Prompt and press Enter.
For all existing local accounts:
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $falseOR
For a specific local account:
Set-LocalUser -Name 'adminuser' -PasswordNeverExpires $falseReplace
adminuserwith the actual username of the local account you want to enable password expiration for. If the command works, the window reports that it ran successfully. If you see an error, check that you opened the terminal as administrator and spelled the username correctly. - Change the maximum and minimum password age for local accounts if you want.
That’s it. The accounts you chose now have to change their passwords after the maximum age passes.
Disable Password Expiration for Local Account(s)
This part makes a local account password never expire, so Windows never asks you to change it. That helps on shared computers and on systems that run tasks unattended, because a surprise password prompt cannot block a sign-in.
Turning off the expiration timer also stops Windows from forcing scheduled password changes. A password that never expires stays valid until you change it yourself, so make it a strong one.
- Type one of the commands below into the Command Prompt and press Enter. Use the administrator tab from step 1.
For all existing local accounts:
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $trueOR
For a specific local account:
Set-LocalUser -Name 'adminuser' -PasswordNeverExpires $trueReplace
adminuserwith the actual username of the local account you want to disable password expiration for. The change takes effect immediately. No restart or sign-out is needed. - Close Windows Terminal (Admin). The setting stays in place after you close it.
You should now have local accounts whose passwords never expire. To undo the change, run the enable command from earlier in this option.
Option Three
Enable or Disable Password Expiration for Local Account in PowerShell
⚠️ Requires admin privileges
PowerShell works on all editions of Windows 11. It is the better choice if WMIC is missing on your build.
These first steps open an administrator PowerShell window, which both the enable and disable commands below need.
- Open Windows Terminal (Admin), and select Windows PowerShell. Click Yes if User Account Control asks. A PowerShell tab opens with administrator rights.
Enable Password Expiration for Local Account(s)
What happens: Once the maximum password age passes, the account must get a new password. This turns password expiration on for the accounts you choose.
- Type one of the commands below into the PowerShell window and press Enter.
For all existing local accounts:
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $falseOR
For a specific local account:
Set-LocalUser -Name 'adminuser' -PasswordNeverExpires $falseReplace
adminuserwith the actual username of the local account you want to enable password expiration for. If PowerShell prints a red error, check the username and confirm the window is running as administrator. - Change the maximum and minimum password age for local accounts if you want.
- Go to the final step below when you finish. It closes Windows Terminal (Admin).
That’s it. The accounts you chose now have expiring passwords again.
Disable Password Expiration for Local Account(s)
Disabling expiration stops Windows from prompting for password changes. That keeps automated tasks and always-on machines from being interrupted by a password that has aged out. Use a strong password, since Windows will not rotate it for you.
- Type one of the commands below into the PowerShell window and press Enter. Use the administrator tab from step 1.
For all existing local accounts:
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $trueOR
For a specific local account:
Set-LocalUser -Name 'adminuser' -PasswordNeverExpires $trueReplace
adminuserwith the actual username of the local account you want to disable password expiration for. The change applies immediately. No restart or sign-out is needed. - Close Windows Terminal (Admin). The setting stays in place after you close it.
You should now have local accounts whose passwords never expire. To undo the change, run the enable command from earlier in this option.
Option Four
Enable or Disable Password Expiration for Microsoft Account Online at Microsoft
A Microsoft account password is stored in the cloud, so the local tools and commands above do not change it. You change the setting on the Microsoft website in a web browser. This works from any device and any edition of Windows 11.
These steps turn the 72-day password expiration on or off for your Microsoft account.
- Go to the Change your password site at Microsoft for your Microsoft account.
- Sign in with your Microsoft account. If you have two-step verification turned on, Microsoft also asks for the code.
- Open the change password page. It asks for your current and new passwords.
- Type your current password in the first box.
- Type a new password in the next box.
- Reenter the new password to confirm it.
- Set Make me change my password every 72 days. Check the box to enable expiration, or uncheck it to disable expiration (this is the default).
- Click Save. Microsoft saves the new password and your expiration choice.
- Sign in to the Microsoft site again with the new password to check that it works. On your PC, use the new password the next time you sign in to Windows with that account.
That’s it. Your Microsoft account now follows the expiration setting you chose. To undo it, repeat these steps and set the box the other way.

Summary
To undo any change, reverse the same setting: tick or clear Password never expires, run the enable command from the same option, or reset the box on the Microsoft website. If a local account still gets a password prompt at sign-in, check that User must change password at next logon is not ticked. Changes to a local account need administrator rights, so open the terminal with Admin rights first.
Have a question about this guide?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!