Sometimes you might want to know, for troubleshooting reasons, what AD Site your machine belongs to.
In this blog post, I cover using nltest dsgetsite 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 in Windows Server and Windows 10.
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 nltest dsgetsite command
Run the following command:
You can see that my machine is a member of the Default-First-Site-Name Active Directory site in the below example.
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 🙂