Most of us have the habit of continuing to use the same password for a long time. It is dangerous, mainly if the password is used in several places. It is possible that in a security breach, the password is open to everyone. Today in this article we are going to share how you can define a Password expiration date for your Microsoft account or Local account. This will force users to change the password every few months.
Here we are setting password expiration for two different types of accounts. Microsoft account and local Windows account. If you're using a Microsoft account in Windows 10, it becomes even more critical to change it from time to time.
When we say Set password expiration date, you can choose what Windows offers for local accounts or set it using the "net" command.
Set password expiration date for Microsoft account
- Go to Microsoft Account Security section
- Click on change my password link under Password security
- Enter the old password and the new password twice
- Check the box that says make me change my password every 72 days
The only downside to this method is that you have to replace the current password with the one you haven't repeated the last three times. Microsoft will then automatically ask you to change the password every 72 days.
You should know that this is different from the PIN code or Windows Hello, which you use on a Windows 10 computer.
Set password expiration date for local account
While it is possible to create an account without a password in Windows 10, this is not a good idea. If you are the administrator of your computer, make sure that all users often change password. There are two ways to do this and this will force users to change their current password. The default is 42 days.
1) Use of the user accounts interface
- In the Run (Win + R) prompt, type lusrmgr.msc then press the Enter key.
- It will open the editor of local users and groups
- Under the Users folder, find the user whose password expiration you want to change
- Double click to open user properties
- Uncheck the box that says Password never expires
- Click the OK button to complete the process
There is a popular WMIC command, but it doesn't seem to work on Windows 10. If you use the command without the "where name" clause, it will set password expiration for all accounts, including accounts. system.
wmic UserAccount where name='John Doe' set Passwordexpires=false
2) Command line options to set the expiration date
When finished, if you want set an exact expiration date, then you must use the "Net Accounts" order. Open PowerShell with administrator privileges and run the command Net accounts. It will reveal the details as below:
Force user logout how long after timeout ?: Never
Minimum password age (days): 0
Maximum password age (days): 42
Minimum password length: 0
Length of password history retained: none
Lockout threshold: never
Lockout time (minutes): 30
Lockout observation window (minutes): 30
IT role: WORKSTATION
If you want to set a particular expiration date, you will need to calculate the number in days. If you set it to 30 days, users will need to change their password once a month.
Execute the command Net Accounts /maxpwage 30
If you want to force someone to change the password instantly, you can use maxpwage: 1
Lily: Force users to change the account password the next time they log in.
3) Use Group Policy to change the password expiration date
- Open the Group Policy Editor by tapping gpedit.msc in the Run prompt and then pressing the Enter key
- Go to Computer Configuration> Windows Settings> Security Settings> Security Settings> Account Policies
- Click the password policy, then click Maximum password age
- Here you can go from 42 to any figure you like. The maximum is between 1-999
I hope the message was easy to follow and that you were able to set the password expiration date for the user account in Windows 10.