On 8 Jun 2004 11:45:36 -0700,
bs****@icc.stat e.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.WriteLi ne(ADEntry.Prop erties("IsAccou ntLocked"))
If I remember correctly, the WinNT provider typically provides the accurate value. I seem to recall
that the LDAP provider does not.
Paul ~~~
pc******@amerit ech.net
Microsoft MVP (Visual Basic)