I had the same error "directory property cannot be found in cache", but I discovered that this only happens on user objects where lastLogonTimestamp is <Not Set>, as evidenced in adsiedit.msc. I am able to get this code to work on accounts where lastLogognTimestamp contains a value.
I hope...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.