Is there a quick way to discover what Active Directory site the current server you are logged into is? I googled but couldn't find anything.


Sites are determined by subnet in CIDR notation in the Sites and Services snap-in. You could just take a screenshot of the configuration and by your IP address, determine what site it should be in. Now, if you're looking for a command that shows the CURRENT site try the gpresult command line tool. I'm almost positive that will print it out for you.

  • double checked it, this will answer your question! Nov 22 '10 at 0:50

Run the following in an administrator command prompt:

gpresult  /R /Scope Computer

Example output:

C:\Windows\system32>gpresult  /R /Scope Computer

Microsoft (R) Windows (R) Operating System Group Policy Result tool v2.0
Copyright (C) Microsoft Corp. 1981-2001

Created On 4/23/2012 at 6:34:45 PM

RSOP data for GB7\- on GB7 : Logging Mode

OS Configuration:            Standalone Workstation
OS Version:                  6.1.7601
Site Name:                   N/A
Roaming Profile:             N/A
Local Profile:               C:\Users\-
Connected over a slow link?: No

Another option would be to use Nltest:

Nltest.exe /dsgetsite

For more details including all applied Group Policy Objects (GPO) run the following commands:

gpresult  /V /Scope Computer
gpresult  /V /Scope User

From a command prompt, run SET.

You'll get a listing of USERDOMAIN and USERDNSDOMAIN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.