Is there a way to disable or grey out the "Password Never Expires" option for local user accounts in Windows 10 or 11 ?

$@chin 200 Reputation points
2025-05-14T16:31:21.9133333+00:00

Hi,

Is there a way to disable or grey out the "Password Never Expires" checkbox for local user accounts in Windows 10 or 11? set of local users, and prevent users including administrators — from modifying this setting.

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Chen Tran 1,035 Reputation points Independent Advisor
    2025-05-15T10:00:10.9466667+00:00

    Hello,

    Thank you for posting the question on Microsoft Windows forum!

    Based on your query of disabling the "Password Never Expires" option for local user account in Windows 10 or 11? You can follow the below methods.

    Method 1 Using GUID:

    1. You must be signed in as an administrator.
    2. On command prompt, type lusrmgr.msc to open Local Users and Groups User's image
    3. Click/tap on the Users folder in the left pane.
    4. Double click/tap on the name of the Local account you want to apply this setting.
    5. In the General tab, check (disable - default) or uncheck (enable) Password never expires for what you want, and click/tap on OK. User's image
    6. You can now close Local Users and Groups.

    Method 2 Using Powershell

    1. Run the following Powershell commands with Administrative Mode , press Enter. (Apply to all existing local accounts)​ Get-LocalUser | Set-LocalUser -PasswordNeverExpires $true
    2. (Apply to specific local account)​ Set-LocalUser -Name 'user name' -PasswordNeverExpires $true User's image Hope the above information is helpful!

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.