Accounts Enable or Disable Password Expiration in Windows 11


  • Staff
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 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

A) Type the command below into the elevated command prompt, and press Enter. (see screenshot below)​

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 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 the elevated command prompt if you like.




Option Three

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


 

Attachments

  • Password.png
    Password.png
    6.8 KB · Views: 99
Last edited:
Can that simple one-liner, be run from within a Batch File?
I'm always looking for the simplest possible way to do things.

TM :cool:
 

My Computer

System One

  • OS
    Win-11/Pro/64, Optimum 11 V5, 23H2 22631.3374
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Made w/Gigabyte mobo/DX-10
    CPU
    AMD FX 6350 Six Core
    Motherboard
    Gigabyte, DX-10, GA-78LMT-USB3
    Memory
    Crucial, 16 GB
    Graphics Card(s)
    NVIDEA GeForce 210, 1GB DDR3 Ram.
    Sound Card
    Onboard
    Monitor(s) Displays
    24" Acer
    Screen Resolution
    1280x800
    Hard Drives
    Crucial SSD 500GB, SanDisk 126GB SSD, Toshiba 1TB HD
    PSU
    EVGA 500 W.
    Case
    Pac Man, Mid Tower
    Cooling
    AMD/OEM
    Keyboard
    101 key, Backlit/ Mechanical Switches/
    Mouse
    Logitech USB Wireless M310
    Internet Speed
    Hughes Net speed varies with the weather
    Browser
    Firefox 64x
    Antivirus
    Windows Defender, Super Anti Spyware
    Other Info
    Given to me as DEAD, and irreparable.
    Rebuilt with Gigabyte mobo, AMD cpu, 16GB ram and 500GB Crucial SSD.
Can that simple one-liner, be run from within a Batch File?
I'm always looking for the simplest possible way to do things.

TM :cool:
Hello mate, :alien:

It sure can, but needs to use "Run as administrator".
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Back
Top Bottom