Pc Guide

Set password expiration and minimum length in Windows 10

password length and expiration
The Windows password is not only important to protect access to the Microsoft PC by other people who live or work with us, but also to protect it from unauthorized remote access and hacking attempts that can take control of the computer . This is especially true if you use a laptop in places other than home and shared computers in offices
After seeing the guide to change Windows 10 passwords, here we take a step forward discovering how it can be done make this password stronger by imposing a minimum length and expiration after which it becomes necessary to change it by force. This can be done for all local PC accounts and each user on Windows 10.READ ALSO: How to create a local account on Windows 10

Set minimum password length and expiration via the command line

The best way to manage and assign rules to Windows 10 login passwords is to use the command line, through the command prompt or Powershell. You can open a command prompt or Powershell with administrator rights by pressing the right mouse button on the Windows 10 Start button and choose the option from the menu that appears (remember to choose the administrator mode).
At the prompt (or Powershell commands don’t change), write:
net accounts / minpwlen: number-characters
Replace number-characters with a number between 1 and 20. Like this the minimum password length will be set.
To remove the minimum password length, type the same command using 0.
To make accounts even more secure, you can also impose a maximum password age, so that users are forced to generate a new password after a certain period of time.
The command for set a password expiration date in Windows 10 is:
net accounts / MAXPWAGE: number-days
Instead of number of days, put the number of days after which you are forced to change the Windows 10 user password.
The following command asks that the password has no expiry date:
net accounts / MAXPWAGE: UNLIMITED

Change password properties from group policy

In Windows 10 Pro and Enterprise, you can set a minimum password length and expiration through the Local Group Policy options window. To open the group policy editor, press the Windows + R keys together and run the command “gpedit.msc“in the box and press the Enter key.
On the left side of the window, switch to Computer Configuration> Windows Settings> Security Settings> Account Policies> Password Policies to find the options used to set the minimum password length and maximum validity, i.e. expiry. You can also find the option Force password history to prevent the same password from being used each time it is changed. moreover, it is possible to define complexity requirements, to ask that the password has at least one capital letter, a number and a symbol inside it.

All of this applies to local Windows 10 accounts, not Microsoft accounts.
If you use a Microsoft account, the password settings are fixed and can be managed from the Microsoft account web page.

READ ALSO: User account management in Windows 10 to change password or reset it

Leave a Reply

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