Sometime you might want to know for the sake of just knowing, or for troubleshooting reasons, what AD Site your machine belongs to.

In this blog post, I cover how to use nltest to find out which Active Directory site a computer belongs to using nltest.

What is nltest?

Nltest, or Network Location Test, is a command-line tool used included in Windows Server and Windows Client.

Some examples of when you can use the tool:

  • Find which site your machine belongs to
  • Retrieve a list of domain controllers
  • Force a shutdown remotely
  • Verify the trust relationship

For a full list of parameters for nltest, refer to Microsoft Docs.

How to run the command

Run the following command:

nltest /dsgetsite
Use nltest /dsgetsite to find out which AD site a computer is a member of

In the below example, you can see that my machine is a member of the Default-First-Site-Name Active Directory site.

I hope this small tip has helped you. Do you have any other simple ways of finding out the AD site for a workstation or server? Please leave a comment below 🙂


Related posts



Please enter your comment!
Please enter your name here