Directory Services

Accessing Active Directory Using Visual Basic

One of the most powerful features in the Microsoft® Windows® 2000 operating system is Active Directory®. When you log on to a Windows 2000 domain, Active Directory is put into action; when you want to search for the closest color printer in your building, Active Directory is at your service. It can be used for an address book lookup or a search for users who work in Building 40. With Active Directory, you can use a smart card to log on to a Windows 2000 domain. You can even join data from Microsoft SQL Server™ and Active Directory.

Many other Microsoft technologies, such as Microsoft Message Queue Server (MSMQ), COM (Class Store), IP security, Group Policy Objects (GPOs), and Exchange are integrated with Active Directory.

This section discusses how to use ADSI to access Active Directory. Using a scenario for a fictitious company — the Fabrikam Corporation — you will learn how to perform some basic administrative tasks.

As you progress through this scenario, the code examples in each section build upon themselves.

For brevity, all samples are written in Microsoft Visual Basic®. For more information about C++ conversion, see Mapping ADSI Visual Basic Code to C++ Code.