Accounts Enable or Disable Password Expiration in Windows 11


Password_banner.png

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.


Contents

  • 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

password_expired_sign-in_screen.jpg





Option One

Enable or Disable Password Expiration for Local Account in Local Users and Groups


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)
  1. Click/tap on the Users folder in the left pane.
  2. Double click/tap on the name (ex: "Brink2") of the Local account you want in the middle pane.
password_expiration_lusrmgr-1.png

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.


password_expiration_lusrmgr-2.png

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.




Option Two

Enable or Disable Password Expiration for Local Account in Command Prompt


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.

3 Enable Password Expiration for Local Account(s)

A) Type the command you want below into the elevated command prompt, press Enter, and go to step 5 below. (see screenshot below)​

(Apply to all existing local accounts)​
wmic UserAccount set PasswordExpires=True

OR​

(Apply to specific local account)​
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.


B) If you like, you can change the maximum and minimum password age for local accounts.​

C) When finished, go to step 5 below.​

enable_password_expiration_command.png

4 Disable Password Expiration for Local Account(s)

This is the default setting.


A) Type the command you want below into the elevated command prompt, press Enter, and go to step 5 below. (see screenshot below)​

(Apply to all existing local accounts)​
wmic UserAccount set PasswordExpires=False

OR​

(Apply to specific local account)​
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.


disable_password_expiration_command.png

5 You can now close Windows Terminal (Admin) if you like.




Option Three

Enable or Disable Password Expiration for Local Account in PowerShell


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.


 3. Enable Password Expiration for Local Account(s)

A) Type the command you want below into the elevated command prompt, press Enter, and go to step 5 below. (see screenshot below)​

(Apply to all existing local accounts)​
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $false

OR​

(Apply to specific local account)​
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.


B) If you like, you can change the maximum and minimum password age for local accounts.​

C) When finished, go to step 5 below.​

enable_password_expiration_PowerShell.png


 4. Disable Password Expiration for Local Account(s)

This is the default setting.


A) Type the command you want below into the elevated command prompt, press Enter, and go to step 5 below. (see screenshot below)​

(Apply to all existing local accounts)​
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $true

OR​

(Apply to specific local account)​
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.


disable_password_expiration_PowerShell.png

5 You can now close Windows Terminal (Admin) if you like.




Option Four

Enable or Disable Password Expiration for Microsoft Account Online at Microsoft


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)

Microsoft_account_password_online-1.png

3 Perform the following actions: (see screenshot below)
  1. Type your Current password.
  2. Type a New password.
  3. Reenter password to confirm.
  4. Check (enable) or uncheck (disable - default) Make me change my password every 72 days for what you want.
  5. Click/tap on Save.
Microsoft_account_password_online-2.png

4 Sign in to the Microsoft site with your Microsoft account's new password to verify. (see screenshot below)

Microsoft_account_password_online-1.png


That's it,
Shawn Brink


 
Last edited:
if you're using pro at home, just check computer management > users.
if you're on a site level, use gpo
shouldnt be too many users to check settings for on a home pc... i wouldn't imagine lol
 

My Computer

System One

  • OS
    Windows 11 Pro

Latest Support Threads

Back
Top Bottom