Articles Windows 10 Set Windows 10 Home Password Never Expires with PowerShell or CMD

Set Windows 10 Home Password Never Expires with PowerShell or CMD

Updated: By Lucca Weber

"The password for this account has expired". After Windows 10 creator update on your computer, you may get this password expiration notification. This notification prompts you to change password before expiration. If you don't want this notification appears on your logon screen any more, you can set the password never expires. How to set Windows 10 home password never expires? This document will show you two ways: from PowerShell or from Command Prompt.

Set Windows 10 password never expires:
Way 1: Set Windows 10 home password never expires via PowerShell
Way2: Set Windows 10 home password never expires with CMD

Way 1: Set Windows 10 home password never expires via PowerShell

1. Open Windows PowerShell as administrator. Right-click on Windows Start icon in lower left corner of your screen, select "Windows PowerShell (Admin)".

open powershell

2. To set Windows 10 password never expires, type in this script and press Enter:
Set-LocalUser -Name "cocosenor" -PasswordNeverExpires 1
(cocosenor is the name of my local user account, please take place of it with your local user account name.)

powershell script to set windows 10 password never expires

3. To check for your Windows 10 local user account situations, type in this script and press Enter:
Net user cocosenor

net user in powershell

Way2: Set Windows 10 home password never expires with CMD

1. Open Windows 10 Command Prompt as administrator. Type in "cmd" to the search box that is in the lower left corner of your screen. Right-click on the search result of Command Prompt, and select "Run as administrator", or click on "Run as administrator" directly on the right panel.

run cmd as administrator

2. To set Windows 10 password never expires, type in the following command and press Enter:
Wmic UserAccount where Name='cocosenor' set PasswordExpires=False
(cocosenor is the name of my user account, change it to yours.)

command to set windows 10 password never expires

3. To check your user account situations, use this command:
Net user cocosenor

net user with cmd

4. To enable Windows 10 password expiration notifications, type in this command and press Enter:
Wmic UserAccount where Name='cocosenor' set PasswordExpires=True

Related Articles