Pcornel
Browse topics
Options
Recent
Favorites
Command · Windows / Windows Server / PowerShell

nltest /dsgetdc:<domain>

nltest /dsgetdc:<domain>

Finds a domain controller for the domain the way the DC locator does, and shows its site and roles.

Execution context

Standard user

Use when

A computer cannot log on to the domain, or uses a domain controller in the wrong site.

Then verify

Check the DNS SRV records with nslookup -type=SRV _ldap._tcp.dc._msdcs.<domain>.

Privilege Standard userState impact Read-onlyProduction Unknown

Operational impact: Read-only.
Command detailsSafety model · family · platform · verification · bundle
PrivilegeStandard user
Execution contextStandard user
State impactRead-only
Safe during productionUnknown
CategoryActive Directory
Evidence levelmixed
Primary DomainWindows
Historical technical verificationNeeds verification dateCurrent command content requires review after a Git edit.
Family Ctive Irectory
PlatformWindows / Windows Server / PowerShell
PrerequisiteStandard user
Output fields

Field glossary

Important fields projected from persisted Command guidance.

DC, Address, Dom Guid, Dom Name, Forest Name, Dc Site Name, Our Site Name, Flags

Important persisted output field; use surrounding guidance for interpretation.

Command → Topic semantics

Used in these Topics

Each relation carries both placement role and operational semantic: verifies, configures, troubleshoots, collects evidence, changes state or general.

DomainsWindows

Find another Command

Reference enrichment

Evidence boundary

What this output can establish — and where you must not over-claim.

Proves

Shows which domain controller the locator finds and which site the client thinks it is in.

Does not prove

Does not prove that authentication to that DC will succeed.

Next check

Check the DNS SRV records with nslookup -type=SRV _ldap._tcp.dc._msdcs.<domain>.

Depth when you need it

Command guidance

Execution context

Standard user

Use when

A computer cannot log on to the domain, or uses a domain controller in the wrong site.

Important fields

DC, Address, Dom Guid, Dom Name, Forest Name, Dc Site Name, Our Site Name, Flags

Common problems

no DC found (DNS SRV records missing); DC from another site because the subnet is not mapped

Operational impact

Read-only.

Technical context

Add /force to skip the cache. If "Dc Site Name" and "Our Site Name" differ, check the AD subnet-to-site mapping.

Confirmation

Confirm action

Continue?