A domain controller is a critical component in Active Directory that authenticates users connecting to the domain. If you’re having trouble accessing resources on a particular domain or if it takes a long time to authenticate your login, your computer may be communicating with the wrong site. Use Command Prompt to find out which DC your system is connected to. There are several commands to find out this.

  • Click Start and enter CMD.
  • When the CMD window opens, enter the following and hit enter:
echo %logonserver%

The %logonserver% environment variable shows the DC which authenticated the *user* - not the computer.
  • Click Start and enter CMD.
  • When the CMD window opens, enter the following and hit enter:
Set l

How can we check from where computer is getting authenticated?

To see which DC authenticated the computer, run this command:
nltest /DSGETDC:

  • Click Start and enter CMD.
  • When the CMD window opens, enter the following and hit enter:

Example- nltest /dsgetdc:windowstechno.local

  • Click Start and enter CMD.
  • When the CMD window opens, enter the following and hit enter:
gpresult /r
CN=Vipan Thakur,OU=AD-Team,OU=Users-Directory,DC=Windowstechno,DC=local
Last time Group Policy was applied: 5/27/2023 at 10:52:12 PM
Group Policy was applied from:      DC11.Windowstechno.local
Group Policy slow link threshold:   500 kbps
Domain Name:                        WINDOWSTECHNO
Domain Type:                        Windows 2008 or later

Instead of the domain controller name appearing in the LogonServer variable, if you logged in to a computer using your local account, the name of your computer will appear.

So, that’s all in this blog. I will meet you soon with next stuff .Have a nice day !!!

Guys please don’t forget to like and share the post.Also join our Active Directory page and where you can post your queries/doubts and our experts will address them .

You can also share the feedback on below ActiveDirectory email id.

If you have any questions feel free to contact us on admin@activedirectory.in also follow us on facebook page to get updates about new blog posts.