Reputation: 333
I have created a script that when you run it, it sets the 'password will never expire' on all accounts to false so the passwords will never expire. The script is as follows:
WMIC USERACCOUNT WHERE "Name='administrator'" SET PasswordExpires=FALSE
I was wondering if there was a script that would allow me to ensure that the 'Allow user to change password box was ticked as well but I was unable to do this. I have tried the following script lines:
WMIC USERACCOUNT WHERE "Name='administrator'" SET PasswordChange=FALSE
WMIC USERACCOUNT WHERE "Name='administrator'" SET AllowPasswordChange=FALSE
Any help would be appreciated.
Upvotes: 0
Views: 1523
Reputation: 31251
After a bit of searching on the net, I think you are after
PasswordChangeable
Upvotes: 3