How to Check Which Domain Controller I Am Using
- Home
- Windows
- General Windows
Hello, i have a question about finding out which domain controller im connected to. I know 2 different commands. 1 being the echo %logonserver% command and the other being the nltest /dsgetdc<domainname> command. When i run these, i get 2 different domain control results. Is one of those commands for the computer profile and the other for the user profile?
The help desk software for IT. Free.
Track users' IT needs, easily, and with only the features you need.
17 Replies
From file explorer, just type %logonserver%
cmd.exe > echo %logonserver%
or Install bginfo
okay so im aware of the logonserver command, but i am trying to understand the difference between that and the nltest /dsgetdc<domainname> command and why it gives a different result.
Would the nltest result be your PDC?
alex32165 wrote:
okay so im aware of the logonserver command, but i am trying to understand the difference between that and the nltest /dsgetdc<domainname> command and why it gives a different result.
First glance it looks like /dsgetdc returns the pdc emulator, logonserver is the dc that youre current session auth with.
C : \ Users \ momurda > nltest / dsgetdc : domain . com DC : \\ dc . domain . com Address : \\ 10 . 1 . 0 . 231 Dom Guid : 4c5457a2 - 4e82 - 4029 - 9d9d - 7e2b2339e5bc Dom Name : domain . com Forest Name : domain . com Dc Site Name : Default -First-Site-Name Our Site Name : Default -First-Site-Name Flags : PDC GC DS LDAP KDC TIMESERV GTIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST CLOSE_SITE FULL_SECRET WS DS_8 The command completed successfully
Or from the command prompt C:\> set L
to get the logonserver
GuruGabe1 wrote:
Would the nltest result be your PDC?
No, the NLtest does not list my PDC.
momurda wrote:
cmd.exe > echo %logonserver%
or Install bginfo
I use this one often.
I get the same thing, two different results (both DCs) from two different commands, but I don't know why either.
What OS are your DCs ?
You may get different results as one is to check which DC is available and other is to check which DC is the machine logged to.
Then also depending on how the DNS settings are set in both DCs (round robin or not), it should not really matter which DC the machines are logged into as DCs are supposed to run as HA and FT (if there are 2 or more DCs properly set up).
alex32165 wrote:
okay so im aware of the logonserver command, but i am trying to understand the difference between that and the nltest /dsgetdc<domainname> command and why it gives a different result.
Well, the answer is that nltest doesn't return the domain controller you're logged into.
Brand Representative for Lepide
To determine computer / server DC use NLTEST:
nltest /dsgetdc:<domain_name>
To list all DC's with their appropriate site, try:
nltest /dclist:<domain_name>
I just use "set" from a command prompt and check the logonserver variable.
Or as pointed out previously, type "set L" to get just the variables beginning with L (or "set Log" to be more specific).
I've always used the Set command on local workstations.
On servers I like nltest /DSGETDC Lot;s more options available by typing nltest /? if you really need to figure things out.,
SETcommand returns the value from the time that it was set, that is, it is not dynamic. So in the event of multiple domain controllers (and the chance you've failed over to a new one) it may mislead.
This topic has been locked by an administrator and is no longer open for commenting.
To continue this discussion, please ask a new question.
How to Check Which Domain Controller I Am Using
Source: https://community.spiceworks.com/topic/2251077-how-to-find-out-what-domain-controller-i-m-connected-to
0 Response to "How to Check Which Domain Controller I Am Using"
Post a Comment