type:
wmic path Win32_UserAccount set PasswordExpires=False
Also, consider using Local Security Policy and Set Max Password Age to 0

The Pro's Cache of Inside Info and Solutions
Next, you will be asked to restart your computer. You will also be informed that, if the repair was successful, your system will start correctly. If not, you might be asked to run the tool again in order to perform another fix. You can also check out the details of your repair by clicking the 'Click here for diagnostic and repair detail' link.