views:

158

answers:

3

How can I get a list of computers and their properties from Active Directory using VB.Net and Visual Studio 2008?

A: 

Check out the DirectorySearcher class.

mgroves
+2  A: 

You're going to want to use the System.DirectoryServices or the System.DirectoryServices.AccountManagement to access your domain.

These namespaces have classes you can use to search your directory and examine the objects it finds.

Is there something you're looking for in particular?

(it's worth noting that is most cases you need to add a reference to these namespaces in your project)

Hugoware
A: 

Working with Active Directory, even with the help of the DirectorySearcher class, is no mean feat. It is not a task to be taken lightly. If you haven't done it before, I'd read up on it before attempting to do so.

I highly recommend The .NET Developer's Guide to Directory Services Programming.

That being said, the classes in the DirectoryServices namespace do some of the work for you, but certainly nowhere near enough of it.

Mike Hofer