When troubleshooting enterprise authentication failures, Group Policy application delays, or single sign-on anomalies on domain-joined Windows 11 devices, administrators require rapid insight into Netlogon communications. The native command-line utility nltest queries the Netlogon service directly, verifying Active Directory trust relationships, querying domain controller discovery routines, and testing secure channel integrity without requiring bulky administrative consoles.
Core Diagnostic Switches
The nltest executable is bundled natively in Windows 11 system directories. Common administrative operations utilise the following parameter combinations:
| Command Syntax | Diagnostic Purpose | Primary Application |
|---|---|---|
nltest /sc_query:corp.example.com |
Queries the status of the workstation’s secure channel to the domain. | Verifying machine account password synchronisation and trust health. |
nltest /sc_verify:corp.example.com |
Forces immediate verification and testing of the secure channel. | Validating authentication readiness after network or certificate changes. |
nltest /sc_reset:corp.example.com\DC01 |
Resets the secure channel and targets a specific domain controller. | Recovering broken machine trust or redirecting away from an impaired DC. |
nltest /dsgetdc:corp.example.com |
Queries the DC locator mechanism using DNS and NetBIOS. | Auditing Active Directory site awareness and subnet assignment accuracy. |
nltest /dclist:corp.example.com |
Enumerates all registered domain controllers for the domain. | Validating directory service redundancy across wide-area networks. |
Step-by-Step Diagnostic Procedures
- Open an Elevated Command Prompt: Press Win + X and choose Terminal (Admin). Ensure the session runs with administrative privileges.
- Querying the Domain Controller Locator: Discover which DC your workstation communicates with and verify that the local client subnet matches the assigned Active Directory site:
Inspect the returned fields:nltest /dsgetdc:example.com /kdcDC Name,Our Site Name, andClient Site Name. IfClient Site Namediffers fromOur Site Name, the client is traversing network boundaries to reach a non-optimal site, signalling a misconfigured subnet definition in Active Directory Sites and Services. - Validating Machine Account Trust: Test whether the cryptographic secure channel between Windows 11 and Active Directory remains intact:
A healthy response returns:nltest /sc_query:example.com
Any return code other thanFlags: 30 HAS_IP HAS_TIMESERV Trusted DC Name \DC01.example.com Trusted DC Connection Status Status = 0 0x0 NERR_Success The command completed successfullyNERR_Successindicates an expired machine password or trust break. - Resetting and Re-establishing Broken Trust: If the secure channel displays authentication failures, execute an immediate reset against a specific responsive DC:
This forces Netlogon to regenerate session keys and re-authenticate without requiring unjoining and rejoining the domain.nltest /sc_reset:example.com\DC02.example.com
Querying Forest Trust Relationships
To inspect multi-domain enterprise environments and verify external or cross-forest trusts, run:
nltest /domain_trusts /all_trusts
This command outputs the complete trust hierarchy, identifying whether trusts are transitive, inbound, outbound, or bidirectional. It provides administrators with immediate clarity when investigating cross-forest permission denials.