For some reason all the local administrator accounts on one of our home Windows 7 systems are set to expire. Solution below.
This is really annoying, but easily fixed. Open a command prompt using “Run as administrator” and issue this command:
wmic useraccount where Name='myuser' \ set PasswordExpires=false
To find out whether an account is set to expire you can use this syntax:
wmic useraccount where Name='myuser' \ get PasswordExpires
The reply will either be “true” or “false”.
Other WMI (Windows Management Instrumentation) query types can be found here.
The WMI Reference is a comprehensive source of information on WMI and the tools to use with it.