A stand-alone Microsoft Windows Server 2012 with logon as local Administrator keeps presenting itself with a popup message that the password is expired in 1 day and that you must change your password. There were a couple of solutions that exist. One seemed more elegant and quicker than the other.
The first solution to use the local security policy. Go to Security Settings > Account Policies > Password Policy > Maximum password age.
The other solution, this simple command.
net accounts /maxpwage:unlimited
I used the simple command. The screenshot above, is actually the result of this command.
Source: https://www.bleepingcomputer.com/forums/t/565081/cannot-set-password-never-expires-server-2012/