Force a Specific Domain Controller via Regedit
By default, Windows uses dynamic DNS queries and Active Directory
site topology to locate and authenticate against an available Domain
Controller (DC). In certain network troubleshooting, testing, or
maintenance scenarios, you may need to bypass this dynamic discovery
process. This guide explains how to use the Windows Registry Editor
(regedit) to force a client machine to target a specific
Domain Controller for Kerberos authentication and how to trigger an
immediate re-authentication.
Step 1: Open the Registry Editor
- Press
Windows Key + Rto open the Run dialog. - Type
regeditand press Enter (or click OK). - If prompted by User Account Control (UAC), click Yes to grant administrative privileges.
Step 2: Navigate to the Kerberos Domain Configuration
To specify a Domain Controller explicitly, you must define the Key Distribution Center (KDC) for your domain in the Kerberos registry key:
In the Registry Editor, navigate to the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\DomainsIf the
Domainskey does not exist underKerberos, right-click onKerberos, select New > Key, and name itDomains.Under the
Domainskey, check if a subkey named after your fully qualified domain name (FQDN) exists (for example,CORP.EXAMPLE.COM).- If it does not exist, right-click
Domains, select New > Key, and name it with your domain’s FQDN in uppercase.
- If it does not exist, right-click
Step 3: Define the Target Domain Controller
- Select the key corresponding to your domain name (e.g.,
CORP.EXAMPLE.COM). - Right-click in the empty space on the right-hand pane and select
New > Multi-String Value
(
REG_MULTI_SZ). - Name this value
KdcNames. - Double-click
KdcNamesto edit its value. - In the Value data field, enter the fully qualified domain name (FQDN) or the IP address of the specific Domain Controller you want to use.
- Click OK to save the value.
Step 4: Force Re-Authentication
Modifying the registry configures where requests are directed, but active sessions and cached tickets must be refreshed to establish a new connection to the specified DC:
Open Command Prompt as an Administrator.
Purge existing Kerberos tickets by running:
klist purgeRestart the Netlogon service to force secure channel renegotiation:
net stop netlogon && net start netlogonLock and unlock the workstation (
Windows Key + L), or sign out and sign back in to complete authentication against the specified Domain Controller.
Step 5: Verify the Active Domain Controller
To confirm that the machine has authenticated against the designated Domain Controller:
Open Command Prompt.
Run the following command to display the current logon server:
echo %LOGONSERVER%Alternatively, check the domain discovery status using
nltest:nltest /dsgetdc:yourdomain.com