T

3 Ways to Set Windows Local Account Passwords to Never Expire

25 views · updated 2026-07-01 · published 2026-07-01 · by Hasarinda Manjula · Microsoft Windows Reading time: 3 min English සිංහල

Overview

Windows can force local account passwords to expire periodically. If you’d rather not be prompted to change them, you can set them to never expire. This guide shows three methods — and when that’s appropriate.

Setting a password to never expire in Windows.

Warning: Passwords that never expire can be a security risk on shared or sensitive systems. Prefer a strong, unique passphrase, and only disable expiry where it’s appropriate.

Key Takeaways

  • Set expiry per user or for all local users.
  • Use lusrmgr.msc, net accounts/wmic, or PowerShell.
  • Not available for Microsoft-account sign-ins (managed online).
  • Use strong passwords to offset the removed expiry.

Method 1: Local Users and Groups

Note: lusrmgr.msc is available on Windows Pro/Enterprise, not Home.

1. Press Windows + R, type lusrmgr.msc, and press Enter.

2. Open Users and double-click the account.

3. Tick "Password never expires" and clear "User must change password…".

4. Click OK.

3 Ways to Set Windows Local Account Passwords to Never Expire

Password/expiry options for a user account.

Method 2: Command Prompt

1. Open Command Prompt as administrator.

2. For all local users: net accounts /maxpwage:unlimited

3. For a specific user: wmic useraccount where "name='USERNAME'" set PasswordExpires=false

Method 3: PowerShell

1. Open PowerShell as administrator.

2. Run: Set-LocalUser -Name "USERNAME" -PasswordNeverExpires $true

3. Verify: Get-LocalUser "USERNAME" | Select Name,PasswordExpires

Troubleshooting

Problem: lusrmgr.msc not found.

Solution: You’re on Windows Home — use the Command Prompt or PowerShell method instead.

Problem: Option greyed out.

Solution: The account may be a Microsoft account; expiry for those is managed online, not locally.

Problem: Setting didn’t apply.

Solution: Run the tool/prompt as administrator, and confirm you targeted the correct username.

Problem: Domain policy re-enables expiry.

Solution: A domain GPO enforces expiry centrally — ask your administrator to adjust it.

Conclusion

You can stop local password-expiry prompts through Local Users and Groups, net accounts/wmic, or PowerShell’s Set-LocalUser. Since you’re removing a security control, pair it with a strong passphrase and apply it only where appropriate.

</w:pBdr><w:spacing w:before="220" w:after="40"/></w:pPr><w:r><w:rPr><w:b/><w:bCs/><w:color w:val="0B5394"/><w:sz w:val="21"/><w:szCs w:val="21"/><w:rFonts w:ascii="Calibri" w:cs="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri"/></w:rPr><w:t xml:space="preserve">About TechHub

This guide is part of the TechHub Knowledge Base. For more step-by-step IT guides and support, visit techhub.com.lk.

Thanks for your feedback! 🙌

Read more

TechHub Assistant
Online · AI assistant
Thinking
⬇ Downloads 📦 Orders 🛒 Buy License 🎫 Create Ticket 🙋 Contact
AI-generated · may be inaccurate. Talk to a human