Export (0) Print
Expand All

Nltest Examples

Updated: March 28, 2003

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

NLTest Examples

Example 1: Verify DCs in a domain

In this example, the /dclist parameter is used to create a list of domain controllers of the domain fourthcoffee.com

nltest /dclist:fourthcoffee

Output displays similar to the following:


Get list of DCs in domain 'ntdev' from '\\fourthcoffee-dc-01'.
    fourthcoffee-dc-01.forthcoffee.com       [DS] Site: Rome
    fourthcoffee-dc-03.forthcoffee.com       [DS] Site: LasVegas
    fourthcoffee-dc-04.forthcoffee.com       [DS] Site: LA
    fourthcoffee-dc-09.forthcoffee.com       [DS] Site: NYC
    fourthcoffee-dc-12.forthcoffee.com       [DS] Site: Paris
    fourthcoffee-dc-24.forthcoffee.com       [DS] Site: Chattaroy
    fourthcoffee-dc-32.forthcoffee.com       [DS] Site: Haifa
    fourthcoffee-dc-99.forthcoffee.com       [DS] Site: Redmond
    fourthcoffee-dc-63.forthcoffee.com [PDC] [DS] Site: London
The command completed successfully

Example 2: Advanced information about users

In this example, you want to find out detailed information about a certain user. At the command prompt, type:

nltest /user:"TestAdmin"

Output displays similar to the following:


User: User1
Rid: 0x3eb
Version: 0x10002
LastLogon: 2ee61c9a 01c0e947 = 5/30/2001 13:29:10
PasswordLastSet: 9dad5428 01c0e577 = 5/25/2001 17:05:47
AccountExpires: ffffffff 7fffffff = 9/13/30828 19:48:05
PrimaryGroupId: 0x201
UserAccountControl: 0x210
CountryCode: 0x0
CodePage: 0x0
BadPasswordCount: 0x0
LogonCount: 0x33
AdminCount: 0x1
SecurityDescriptor: 80140001 0000009c 000000ac 00000014 00000044 00300002 000000
02 0014c002 01050045 00000101 01000000 00000000 0014c002 000f07ff 00000101 05000
000 00000007 00580012 00000003 00240000 00020044 00000501 05000000 00000015 22cd
b7b4 7112b3f1 2b3be507 000003eb 00180000 000f07ff 00000201 05000000 00000020 000
00220 00140000 0002035b 00000101 01000000 00000000 00000201 05000000 00000020 00
000220 00000201 05000000 00000020 00000220
AccountName: User1
Groups: 00000201 00000007
LmOwfPassword: fb890c9c 5c7e7e09 ee58593b d959c681
NtOwfPassword: d82759cc 81a342ac df600c37 4e58a478
NtPasswordHistory: 00011001
LmPasswordHistory: 00010011
The command completed successfully

The detailed information provided can be used to troubleshoot many issues.

Example 3: Verify trust relationship with a specific server

In this example, you want to verify that the server a-dc1 has a valid trust relationship with the domain. At the command prompt, type:

nltest.exe /server:fourthcoffee-dc-01 /sc_query:fourthcoffee

Output displays similar to the following:


Flags: 30 HAS_IP  HAS_TIMESERV
Trusted DC Name \\fourthcoffee-dc-01.forthcoffee.com
Trusted DC Connection Status Status = 0 0x0 NERR_Success
The command completed successfully

Example 4: Determine the PDC emulator for a domain

In this example, you want to determine which DC in your domain the Windows NT 4.0–based computers are looking to as the PDC. At the command prompt, type:

nltest /dcname:fourthcoffee

Output displays similar to the following:


PDC for Domain fourthcoffee is \\fourthcoffee-dc-01
The command completed successfully

You can see that a-dcp is the PDC emulator for your domain.

Example 5: Show trust relationships for a domain

In this example, you want to view the established trust relationships for your domain. At the command prompt, type:

nltest /domain_trusts

Output displays similar to the following:


List of domain trusts:
    0: forthcoffee forthcoffee.com (NT 5) (Forest Tree Root) (Primary Domain)
The command completed successfully

This example shows that one domain is trusting itself and no others.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft