Setting PwdLastSet with VBScript

Learn why setting PwdLastSet may not be working

John Savill

June 2, 2017

1 Min Read
Setting PwdLastSet with VBScript

Q. I'm setting PwdLastSet to 0 with VBScript but users are not being prompted to set password at logon. Why?

A. To force users to reset their password the pwdLastSet attribute must be set to long 0 rather than the VBS default 0. Therefore you need to use the following:

usr.Put "pwdLastSet", CLng(0)

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like