cmd line Change password and prevent password change

I changed the password to "username" + the number 1 to get in
then:

wmic UserAccount where Name="Username" set PasswordExpires=False
then put password back with:
net user "username" password