Windows Domain Controller (DC) is a server that responds to security authentication requests within a Windows Domain (group of networked computers controlled by domain controller).
In this short note i will show how to find out which DC a computer is authenticated to using Windows CMD and PowerShell.
Cool Tip: Check if the computer is in a domain! Read more →
What Domain Controller Am I Connected To
Get domain controller name in Windows CMD:
C:\> echo %LogOnServer%
Get domain controller name in PowerShell:
PS C:\> $env:LogOnServer
To find out the FQDN and IP address of the domain controller, you can use
nslookup command that works both in Windows CMD and PowerShell:
C:\> nslookup MYDOMAINCONTROLLER01
Cool Tip: How to determine whether the current user is a Domain User account or a Local User account! Read more →