My Script is returning the wrong Password Last Set Date for SOME users, not all. (Solved) RRS feed

  • Question

  • I have a vb script that I wrote a year ago that runs once a day, checks the user's last password set date, compares it to the password age and if their password is going to expire in the next 15 days, it sends the user an Email letting them know their password is going to expire soon.   Today, I received an Email from a user who changed her password a week ago, but she keeps getting the Email that he password is going to expire in 8 days.   I have manually checked the Password Last Set date for her account, and she did change it on June 20, 2017, but my script reports that she has not changed her password since April 6, 2017.  This is the same for a couple other users that I was able to verify.  The oddest issue is that the report does show that other users have changed their password up to today so the script works, but it just does not seem to pull the correct information from some users and I am completely lost now.

    Has anyone ever seen anything like this?

    The user is in the same OU as all other employees.  Her password is not set to never expire and I do not know what else to do.  Is there a way to find out what Domain Controller is the one that the script is running against?  I am wondering if I have a specific server having issues.

    • Edited by Mistico3 Tuesday, June 27, 2017 5:53 PM
    • Moved by Bill_Stewart Wednesday, July 26, 2017 7:50 PM User answered own question (not answerable in forum)
    Tuesday, June 27, 2017 5:20 PM

All replies

  • Whithout at least a little bit of the relevant code it would be just guessing ...

    But when it does not work correctly anyway you could take the chance and port your script to a more modern scripting technology like Powershell. There are many already writtn scripts out there and there are more people able to help you with problems in case of need.  ;-)

    Grüße - Best regards

    PS:> (79,108,97,102|%{[char]$_})-join''

    Tuesday, June 27, 2017 5:36 PM
  • Okay,  turns out it was a replication issue.  Our main Domain Controller stopped replicating to the rest and it looks like my script was connecting to one of the other DCs and was therefore, getting the wrong information.

    Tuesday, June 27, 2017 5:52 PM