How to Set Password to Never Expire from Command Line

Today in this article talking about- how to set password to never expire? You can easily set your password never expire from CMD. You can be done from a local user account console.

Just run the below command line to disable password expire.

Open the admin command prompt and run the command below.

WMIC USERACCOUNT WHERE Name='username' SET PasswordExpires=FALSE

How to Run Command Prompt as an Administrator

Example: You can see the results To never expire password of the administrator account.

c:\>net user administrator | findstr /C:expires
Account expires              Never
Password expires             9/12/2017 9:02:26 PM

Above command, you saw that a date but you can go to change and finally set never.

c:\>WMIC USERACCOUNT WHERE Name='administrator' SET PasswordExpires=FALSE
Updating property(s) of '\\MYPC\ROOT\CIMV2:Win32_UserAccount.Domain="MYPC",Name="administrator"'
Property(s) update successful.

You can also check the password expiry date now and it always never.

c:\>net user administrator | findstr /C:expires
Account expires              Never
Password expires             Never

How to Create Unique Named File From Batch Script

How to using user accounts console and how to disable password expiry?

  1. Just run the command lusrmgr.msc
  2. Now click on the users to list displayed on the left side
  3. You need to click on the user account if you like to update
  4. Easily select the button andpassword never expires finally click on.
    How to Set Password to Never Expire from Command Line

How To Delete Temp Files Using Command Prompt

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.