Setting PwdLastSet with VBScript

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)

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish