Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 5 down vote accepted

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.

share|improve this answer
    
double checked it, this will answer your question! –  SpacemanSpiff Nov 22 '10 at 0:50

From a command prompt, run SET.

You'll get a listing of USERDOMAIN and USERDNSDOMAIN.

share|improve this answer

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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