On 8 Jun 2004 11:45:36 -0700,
bs****@icc.state.il.us (bsmith) wrote:
¤ I would like to determine if an Active Directory user account is
¤ locked. Active directory is running on W2k3 server. I also want to
¤ do this using the DirectoryEntry object. I have read a lot of threads
¤ and there does not seem to be a consistent answer.
See if the following works for you:
Dim ADEntry As New DirectoryEntry("WinNT://DomainName/UserAccount")
Console.WriteLine(ADEntry.Properties("IsAccountLoc ked"))
If I remember correctly, the WinNT provider typically provides the accurate value. I seem to recall
that the LDAP provider does not.
Paul ~~~
pc******@ameritech.net
Microsoft MVP (Visual Basic)