w3n2u
w3n2u

Reputation: 333

Is there a batch script that will set the 'Allow user to change password' to false?

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

Answers (1)

Bali C
Bali C

Reputation: 31251

After a bit of searching on the net, I think you are after

PasswordChangeable

Upvotes: 3

Related Questions