Which domain controller I’m connected ? (or how to find domain controller)
In an environment where there are several domain controllers, sometime we want to know which domain controller our computer is connected .
In this post I will show some ways to get the information.
Option-1 Using nltest
Open command prompt with administrative privileges and run:
you need to replace “domain_name” with your domain (domain.local for example).
Option-2 the SET command
again, open CMD, run SET and Look at the variable called %LOGONSERVER%.
Tip, you can narrow the results relevant line only by run this command:
c:\>set | find “LOGONSERVER”
Option-3 echo command
this command will print the value of the environment variable LOGONSERVER giving you the machine name of the domain controller used.
– Skepper –