Setting password expiration date for specific local account in Windows

1

Is it possible to set password expiration date for one local account in Windows? It's possible to set account policy with net accounts /maxpwage command, but I'm interested in changing the date for one specific account, without making changes to the policy or other accounts.

The net user <logonname> command can show the expiration date for the account given in Password Expires: field, but it seems like you cannot change it with any net user switch.

P. D

Posted 2019-06-15T11:41:06.410

Reputation: 11

Answers

0

Password expiration is a global site setting and cannot be set only for a single account.

The most you can do is to set the account to have a password that expires or does not expire, all according to the site expiration policy.

If you are looking for a command-line tool, this is the wmic command, and the syntax is:

wmic UserAccount where Name="user name" set PasswordExpires=True

For more information see:

harrymc

Posted 2019-06-15T11:41:06.410

Reputation: 306 093

Sorry, but it's about account expiration, not password expiration. Those are different things... – P. D – 2019-06-16T21:01:40.607

So what is the question? You asked: "Is it possible to set password expiration date for one local account in Windows?" – harrymc – 2019-06-17T06:22:44.050

The question is about password expiration. Your answer is about account expiration. Different things. – P. D – 2019-06-21T01:05:58.373

My answer was for the only date-expiration property possible for an account. I rewrote my answer for password expiration only. – harrymc – 2019-06-21T08:00:33.130