Skip to content

Windows NLTEST command

The Windows nltest command is a powerful tool for managing domain trust relationships and troubleshooting network issues. With nltest, you can verify trust relationships between domains, force a replication of the trust secrets, and reset a computer account’s password. This command can also be used to ensure secure communication between domain controllers and diagnose network connectivity problems. By understanding the various options and parameters available with the nltest command, you can efficiently manage and troubleshoot your Windows network environment.

Terminal window
nltest [option] [parameter]
OptionDescription
/server:ServerNameSpecifies the server to connect to.
/sc_query:DomainNameQueries the primary domain controller for the specified domain.
/driver_test:DomainNameTests security channels to the specified domain.
/dsgetdc:DomainNameQueries a Domain Controller (DC) for a specific domain.
/dsgetsiteDisplays the site of the current computer.
/dsaddchildnameAdds a child name to the list of names that are acceptable for online authentication.
/dsquerysrvQueries DNS for DCs in a domain.
/get_dc:DomainNameGets the primary domain controller for the specified domain.
/server:ServerNameSpecifies the server to connect to.
/trusted_domain:DomainNameQueries a specified trusted domain.
/user:UserNameSpecifies the user account to use for the connection.
ParameterDescription
ServerNameSpecifies the name of the server or domain to target.
DomainNameSpecifies the name of the domain or directory service to query.
UserNameSpecifies the user account for authentication.

Querying the Trust Relationship between a Domain and a Domain Controller

Section titled “Querying the Trust Relationship between a Domain and a Domain Controller”
Terminal window
nltest /query /sc_query:example.com

Queries the trust relationship between the domain “example.com” and a domain controller.

Terminal window
nltest /domain_trusts

Enumerates all trusted domains for the current domain.

Verifying Secure Channel between a Computer and a Domain Controller

Section titled “Verifying Secure Channel between a Computer and a Domain Controller”
Terminal window
nltest /sc_verify:exampleDC

Verifies the secure channel between a computer and a specific domain controller named “exampleDC”.

Retrieving Information about the Global Catalog Server

Section titled “Retrieving Information about the Global Catalog Server”
Terminal window
nltest /dsgetdc:example.com

Retrieves information about the Global Catalog Server for the domain “example.com”.

To use the nltest command in Windows, execute the following command:

Terminal window
nltest /dsgetdc:domain_name

What is the purpose of the nltest command?

Section titled “What is the purpose of the nltest command?”

The nltest command in Windows is used to perform various operations related to network settings and domain controllers.

How can I list all trusted domains using nltest?

Section titled “How can I list all trusted domains using nltest?”

You can list all trusted domains by running the following command:

Terminal window
nltest /domain_trusts

How do I force a refresh of the secure channel with the domain controller using nltest?

Section titled “How do I force a refresh of the secure channel with the domain controller using nltest?”

To force a refresh of the secure channel with the domain controller, use the following command:

Terminal window
nltest /sc_query:domain_name

How do I test the secure channel between the computer and the domain controller using nltest?

Section titled “How do I test the secure channel between the computer and the domain controller using nltest?”

To test the secure channel between the computer and the domain controller, run the following command:

Terminal window
nltest /sc_verify:domain_name

How can I determine the site associated with the domain controller using nltest?

Section titled “How can I determine the site associated with the domain controller using nltest?”

To determine the site associated with the domain controller, use the following command:

Terminal window
nltest /dsgetsite

How do I query the trusts for a specific domain using nltest?

Section titled “How do I query the trusts for a specific domain using nltest?”

To query the trusts for a specific domain, execute the following command:

Terminal window
nltest /server:domain_controller /trusted_domains
  • Query domain controller information
  • Test trust relationships
  • Force replication between domain controllers
  • Reset secure channel to domain controller
  • List trusted domains
  • Simulate NetLogon secure channel
  • List site information
  • List domain controllers in a site
  • Display trusted domain information
  • List domain’s policies
  • Verify trust relationships