Very many computers and accounts get hacked or otherwise compromised in the digital age. One of the most common security tips given to users is to change your password several times, often and regularly to prevent being compromised.
For users on PCs, while changing the password for your online Microsoft account can help secure it – as well as your PC – users who opt to use Offline or Local accounts on PCs are left vulnerable.
With Windows 10 however, you can use the command prompt to set your password to automatically expire after a timer period, forcing you to change it. This applies only to local accounts and not to MSA (Microsoft services) enabled accounts.
Here’s how to enforce automatic password expiry on Windows 10
- Open the command line interface by right-clicking on the Start button and selecting Command Prompt (Admin) from the menu.
- In the Command Prompt Windows, type the following command “wmic UserAccount set PasswordExpires=True” .
- Next, enter the following command “net accounts /maxpwage:30” The last number there refers to the number of days before a forced password change is required, and can set it to any amount you want, though some experts advise users to change their passwords between 2 -3 months.
- Once that is done, you can now review your settings wth this command” net accounts”