The length of the heading is almost longer than the blog post 🙂
Anyway, for whatever reason i had to set a Windows Server 2019 local user account password policy to never expire via the command prompt the other day.
There are only two commands required to accomplish this so here we go.
- First – start a command prompt
- Verify existing configuration via command net user <username> and look for the line Password expires.
- Next set the password to never expire via the following command vmic useraccount where “Name=’username'” set PasswordExpires=FALSE
Important: make sure to include a double quote around Name and username plus single quote around the username. - Last thing – just verify the configuration using command net user username and make sure the line Password expires says Never
Easy as that but there is an even easier way which i trust everyone that has ever worked with Windows Server 2008 and above (if not mistaken) is aware of and that is using Local Users and Groups Microsoft Management Console (MMC) snap-in