Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

C#: Searching Active Directory

Back to Forum: Tech Off
  • User profile image
    SlackmasterK

    I'm trying to get the names of computers from an Active Directory server on my network.  I have the access.

    Specifically, I'd like to come up with a way to generate an array of objects from whence I can derive a name and/or IP address.  I intend to use this to create a tool that will return all computer names within a given subnet.

    Any help would be appreciated; thanks.

  • User profile image
    JPeless

    System.DirectoryServices; namespace after you import the System.DirectoryServices DLL into the project.

    Then you query the active directory server and will have DirectoryEntry objects to work with.

    "WinNT://" + domain is how I talk to our server, not sure if it is any different with Active Directory.  But then the query for computers would be different that what I do (I perform user synchronization so I don't care about computer entries).

  • User profile image
    Matthew van Eerde

    IIRC it's all based on LDAP.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.