Announcement

Collapse
No announcement yet.

VBscript + AD + Group policy + passwords

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • VBscript + AD + Group policy + passwords

    I needed to change passwords for all users in OU so that password=login. I use this code:
    Code:
    objUser.SetPassword lcase(objUser.CN)
    but in the given domain there is active password complexity policy, so that nobody could use easy password. I use some scripting to turn it off, change passwords and then turn it on.
    the problem is - i need to know whether the password was changed or not.
    I could try to catch an exception in the vbscript manner, but i don't know error code for this error (i get Err.Number = -2147016651 and no description) or "The server is unwilling to process the request" message (if the option "On Error Resume Next" is turned off)
    So, my questions are:
    1. what is the error code for this situation?
    2. is it possible to check if password is legal for current password complexity policy?
    3. is there a way to chech if password changed or not?

  • #2
    Re: VBscript + AD + Group policy + passwords

    On what OS+SP are the DCs and, what is the Domain Functional Level?


    \Rems

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: VBscript + AD + Group policy + passwords

      Originally posted by Rems View Post
      On what OS+SP are the DCs and, what is the Domain Functional Level?


      \Rems
      windows 2003 server and i dont know the sp
      i dont know what is Domain Functional Level

      Comment

      Working...
      X