Home Forums OS X Server and Client Discussion Active Directory Locate nearest domain controller

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #367929
    thawk9455
    Participant

    I’m trying to locate the nearest domain controller for a script. We have numerous locations that use multiple domain controllers and I’ve created a logon script that configures users servers, email, etc. on the fly. At the moment I’ve got a large if/else statement that uses part of the computer name to determine a site code and then enters the domain controller based on that.

    I’m trying to find a way to automate this process. I’m close with some random dns lookups but can anyone point me in the right direction on the “correct” way to do this?

    Thanks for any info!

    #367935
    thawk9455
    Participant

    It’s used for two purposes right now and the first is probably the most important.

    Step on, a small script runs on the local machine on logon that calls a larger script kept on servers. Corporate has created a read only location on each domain controller that is replicated specifically for this purpose. Right now because the script is only used at our locations (about 20 locations accessing about 11 domain controllers) I use an if/else statement to determine the site and then manually fill in the domain controller. Then I build the servers connect (example smb://somedomaincontroller/someshare) and open the larger script. By doing this I’m able to make changes to the main script for every computer in one shot. I want the closest domain controller (or even just the one the Mac is using right now) so that machines will attempt to connect to the local share if there is one rather than pulling the script over the WAN.

    The second use is to fill in the LDAP server when configuring Entourage (I’d love to use Mail but I haven’t found ways to manage delegates, etc.).

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed