in reply to Listing Domain Controllers

"I cannot find a DNS module for the WIN32 environment.

Add repositories via PPM::Repositories or install via cpan. Regarding the AD question, did you look at any of the modules I suggested in the chatterbox? Win32::NetAdmin, Win32::OLE or the LDAP modules?

Replies are listed 'Best First'.
Re^2: Listing Domain Controllers
by fritz1968 (Sexton) on Sep 23, 2010 at 14:05 UTC

    Yes, I did look though the win32::NetAdmin. GetServers looked to be the most promising, but I could not figure out how to list just the Domain Contollers. It seems that it listed everything but the Domain Contollers... including the workstations... and we have 50k+ workstations here.

    I would assume that any of the following SV codes would list the servers:
    SV_TYPE_SERVER
    SV_TYPE_DOMAIN_CTRL

      "Yes, I did look though the win32::NetAdmin. GetServers looked to be the most promising, but I could not figure out how to list just the Domain Contollers."

      Did you miss the GetDomainController and GetAnyDomainController functions? They are the second and third functions listed in the docs.

        Yes, I found both of those functions (GetDomainController and GetAnyDomainController). However, I want to list ALL of the domain contollers.. not necessarily the PDC, which GetDomainController does, or any one Domain Contoller, which GetAnyDomainController does.

        I am using GetDomainController without any problems.

        Thanks for your suggestions. I do appreciate it!