Rem: Using ADSI to Unlock an AD User Account

If you're having problems using ADSI to unlock an AD user account, here's a workaround.

Bob Wells

October 7, 2002

1 Min Read
ITPro Today logo in a gray background | ITPro Today


How can I unlock an Active Directory (AD) user account by using Active Directory Service Interfaces (ADSI)? The code in Listing 2, page 6, which I obtained from Microsoft's ADSI software development kit (SDK), doesn't work.

The problem you're experiencing is a known problem with the Lightweight Directory Access Protocol (LDAP) provider on Windows 2000. The workaround is to use the WinNT: provider that Web Listing 1 (InstantDoc ID 26634) shows. You can find more information about the workaround in the Microsoft article "Programmatically Changing the Lockout Flag in Windows 2000" (http://support.microsoft.com/default.aspx?scid=kb;en-us;q250873). Microsoft fixed the problem in Windows XP.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like