Which domain controller i connected to ?

December 16, 2013

no comments

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:

c:\>nltest /dsgetdc:<domain_name>

you need to replace “domain_name” with your domain (domain.local for example).

How_to_find_out_which_Domain_Controller_my_PC_is_talking_to

Option-2 the SET command

again, open CMD, run SET and Look at the variable called %LOGONSERVER%.

c:\> set

set

Tip, you can narrow the results relevant line only by run this command:

c:\>set | find “LOGONSERVER”  

or

c:\>set log

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.

c:\>echo %logonserver%

echo

– Skepper –

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.