Wednesday, May 26, 2010

How to find out which domain controller i'm talking to?

To find out which domain controller your PC is talking to, use the following command:

nltest /dsgetdc:domainname.local

This is very handy when testing your active directory sites and services topology to ensure it is setup correctly. If you want to understand the process in which a client computer locates its domain controller please see this post:


  1. hi,

    'set l' - less informative but quicker and uses builtin command

  2. You are refering to the %logonserver% environment variable. This variable is not always accurate, for example if you travel from one location to another with your laptop the variable takes a while to update. I am not 100% sure what updates the variable but I know that nltest gives you RIGHT NOW information on which DC your talking to from my experiance.

  3. But not from an XP client (without installing a resource kit)

  4. Hmm. I get: Getting DC name failed: Status = 1355 0x54b ERROR_NO_SUCH_DOMAIN

  5. Austin, replace "domainname.local" with YOUR actual domain name.

  6. Nice Post, thank you very much for sharing.