I recently came across a brilliant script by Jeffrey4859 and I found it was missing something for me. I haven't had much success capturing the accountLocked and accountExpires.
I have used at least a dozen different examples of people's shared scripts but none seem to work as well as the one below - with the exception:when I addlockoutTime and accountExpires to the SELECT and try to response.write("lockoutTime") or "accountExpires", the result is always null, regardless of the value ADSIEDIT shows.
This part works to discover account locked for me, but it's painfully slow when you have to do it to eachloop for each of the hundreds of users! I am trying to avoid using it, unless there is a way to GetObject all the users at once and go from there...
'Set objDisplayedUser = GetObject("WinNT://contrans.ca/" & objRS("sAMAccountName") &...