troubleshooting Question

How do I get ADSI property

Avatar of aurion
aurion asked on
Visual Basic Classic
3 Comments1 Solution302 ViewsLast Modified:

I want to find out if the 'Must change password on next logon' option is selected for a specific user.

For this I want to use ADSI. I have found a security property 'pwdLastSet' in the MDSI Help File that I want to check, but when I try to read it I get a message telling me that it was not found in the cache. Can anyone help me with this problem. Here is the VB code I have used.

Dim user as IADSUser
Dim answer

Set user = ("WinNT://domainname/username")
answer = user.Get("pwdLastSet")

I try to run this in win2000, but it must also work for NT.

If this isn't a good way to do this, do you have any other idea of how to do it?

Sorry I don't have any more poits to effer (new member). I hope that someone will help me anyway. I would be most grateful!

/ Daniel

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros