How to enforce the user to change their password via password policy within a period on gpeditor.msc without using domain

Anna 26 Reputation points
2023-07-07T13:55:47.8766667+00:00

For testing purpose, I tried to enforce a user to change his windows login password every 2 days by altering the setting the password policy on gpeditor.msc locally, without using the domain setting, but unsuccessful. Please advise why. Thank you!

anna

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

1 answer

Sort by: Most helpful
  1. Wesley Li-MSFT 4,576 Reputation points Microsoft External Staff
    2023-07-10T07:36:38.29+00:00

    Hello

    It seems that you have already tried to change the password policy setting on gpeditor.msc locally without success. Another way to force a user to change their Windows login password periodically is by using the Command Prompt. Here are the steps:

    1.Open Start, search for Command Prompt, right-click the result and select Run as administrator.

    2.Type the following command to enable password expiration and press Enter:

    wmic UserAccount set PasswordExpires=True

    3.Type the following command to set the number of days a password can be used before Windows requires users to change it and press Enter:

    net accounts /maxpwage:2

    This will set the maximum password age to 2 days, after which the user will be prompted to change their password.

    If the response is helpful, please click "Accept Answer" and upvote it.

    1 person found this answer helpful.
    0 comments No comments

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.