This tutorial will show you how to enable or disable password expiration for an account in Windows 10 and Windows 11.
When you enable password expiration for an account, the user will be forced to change their password the next time they sign in when it expires.
A local account password will expire when a maximum (42 days by default) and minimum ( 0 days by default) password age has been reached by default.
A Microsoft account password will expire every 72 days by default.
- Option One: Enable or Disable Password Expiration for Local Account in Local Users and Groups
- Option Two: Enable or Disable Password Expiration for Local Account in Command Prompt
- Option Three: Enable or Disable Password Expiration for Local Account in PowerShell
- Option Four: Enable or Disable Password Expiration for Microsoft Account Online at Microsoft
EXAMPLE: password expired for local account on sign-in screen
You must be signed in as an administrator to use this option.
Local Users and Groups is only available in the Windows 10/11 Pro, Enterprise, and Education editions.
All editions can use Option Two
1 Open Local Users and Groups (lusrmgr.msc).
2 Perform the following actions: (see screenshot below)
- Click/tap on the Users folder in the left pane.
- Double click/tap on the name (ex: "Brink2") of the Local account you want in the middle pane.
3 In the General tab, check (disable - default) or uncheck (enable) Password never expires for what you want, and click/tap on OK
Password never expires will be grayed out if the User must change password at next logon box is checked.
4 If you like, you can change the maximum and minimum password age for local accounts.
5 You can now close Local Users and Groups if you like.
You must be signed in as an administrator to use this option.
1 Open Windows Terminal (Admin), and select Command Prompt.
2 Do step 3 (enable) or step 4 (disable) below for what you want.
wmic UserAccount set PasswordExpires=True
wmic UserAccount where Name="user name" set PasswordExpires=True
Substitute user name in the command above with the actual user name (ex: "Brink2") of the local account you want to enable password expiration.
This is the default setting.
wmic UserAccount set PasswordExpires=False
wmic UserAccount where Name="user name" set PasswordExpires=False
Substitute user name in the command above with the actual user name of the local account you want to disable password expiration.
5 You can now close Windows Terminal (Admin) if you like.
You must be signed in as an administrator to use this option.
1 Open Windows Terminal (Admin), and select Windows PowerShell.
2 Do step 3 (enable) or step 4 (disable) below for what you want.
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $false
Set-LocalUser -Name 'user name' -PasswordNeverExpires $false
Substitute user name in the command above with the actual user name (ex: "Brink2") of the local account you want to enable password expiration.
This is the default setting.
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $true
Set-LocalUser -Name 'user name' -PasswordNeverExpires $true
Substitute user name in the command above with the actual user name of the local account you want to disable password expiration.
5 You can now close Windows Terminal (Admin) if you like.
This option will also involve having to change your Microsoft account's password.
1 Go the Change your password site at Microsoft for your Microsoft account.
2 Sign in to the Microsoft site with your Microsoft account to verify. (see screenshot below)
3 Perform the following actions: (see screenshot below)
- Type your Current password.
- Type a New password.
- Reenter password to confirm.
- Check (enable) or uncheck (disable - default) Make me change my password every 72 days for what you want.
- Click/tap on Save.
4 Sign in to the Microsoft site with your Microsoft account's new password to verify. (see screenshot below)
That's it,
Shawn Brink