AD.CLOUDSCHOOL.AI · PAGE 08 OF 14

Troubleshooting Active Directory

A method plus dcdiag, repadmin, nltest, DNS and time checks, the key event IDs and fixes for the most common AD problems.

A method that works

  1. Scope it: one user, one computer, one site, one DC or everyone? Since when? What changed?
  2. Check the foundations in order: network and ports → DNS → time → secure channel → replication → the service itself.
  3. Read the right log: Directory Service, DNS Server, DFS Replication and System on DCs; Security for logon failures; Group Policy operational log on clients.
  4. Reproduce and compare with a working user, computer or DC.
  5. Fix one thing at a time and record it.

Most "AD problems" are DNS problems. Check DNS first.

Health checks to run first

dcdiag /v /c /e /q                         # every test, every DC, errors only
dcdiag /test:dns /v /e                      # DNS registration and delegation
repadmin /replsummary
repadmin /showrepl * /csv
nltest /dsgetdc:corp.contoso.com            # does the client find a DC?
nltest /sc_verify:corp.contoso.com          # is the secure channel healthy?
w32tm /monitor                              # time offset of every DC
Get-ADDomainController -Filter * | Select Name, Site, IsGlobalCatalog, OperatingSystem
Test-ComputerSecureChannel -Verbose

DNS

  • Clients and member servers must use only AD DNS servers, never a public resolver as secondary.
  • Missing SRV records: restart Netlogon or run nltest /dsregdns; check %SystemRoot%\System32\Config\netlogon.dns for what should exist.
  • Check the _msdcs delegation and that each DC's <DSA GUID>._msdcs CNAME resolves.
  • Stale records after IP changes: enable aging and scavenging.
Resolve-DnsName _ldap._tcp.dc._msdcs.corp.contoso.com -Type SRV
Resolve-DnsName dc01.corp.contoso.com
ipconfig /registerdns

Replication failures

Error / eventMeaningFix
1722 RPC server unavailableNetwork, firewall or DNS between DCs.Test ports 135 and the dynamic range, DNS name of partner.
8453 Access deniedPermissions or a broken secure channel.Check the DC's computer account, reset with netdom resetpwd.
8524 DNS lookup failurePartner's _msdcs CNAME missing.Fix DNS registration of the partner DC.
8606 / 1988 lingering objectsPartner holds objects deleted elsewhere.repadmin /removelingeringobjects.
2042 tombstone lifetime exceededDC has not replicated for more than 180 days.Demote and rebuild the DC.
2095 USN rollbackDC restored from an unsupported image.Demote forcibly, metadata cleanup, rebuild.
1311 / 1865KCC cannot build a full topology between sites.Check site links, bridges and bridgeheads.
DFSR 2213 / 4012SYSVOL paused after a dirty shutdown, or offline too long.Resume with the WMI command in the event, or authoritative/non-authoritative SYSVOL sync.

Logon and authentication problems

SymptomLook at
"The trust relationship between this workstation and the primary domain failed"Broken secure channel: Test-ComputerSecureChannel -Repair -Credential CORP\admin, or rejoin. Often caused by restoring an old VM snapshot.
Account keeps locking outEvent 4740 on the PDC emulator names the caller computer; then find the stale credential (mapped drives, services, phones). Microsoft's LockoutStatus.exe helps.
Kerberos fails, NTLM worksTime skew (KRB_AP_ERR_SKEW), missing or duplicate SPN (setspn -X), access by IP address instead of name, RC4-only accounts. Events 4768, 4769, 4771.
Slow logonWrong site (missing subnet), slow GPOs (Group Policy operational log), big profiles, unreachable DC in DNS.
Failed logonsSecurity events 4625 (any machine) and 4771/4776 (DCs) with the failure code.
klist                    # tickets of the current session
klist purge              # drop tickets and get new ones
whoami /groups /priv     # what is in my token
Get-ADUser alice -Properties LockedOut, BadLogonCount, LastBadPasswordAttempt, PasswordLastSet
Unlock-ADAccount alice

Group Policy not applying

  1. gpresult /r or /h: is the GPO listed as applied, or filtered out (security, WMI, empty, disabled link)?
  2. Is the object in the OU you think? Is the setting in the right half (user vs computer)?
  3. Event Viewer → Applications and Services Logs → Microsoft → Windows → GroupPolicy → Operational.
  4. SYSVOL in sync? Compare GPC and GPT versions in GPMC Details or the Status tab.

More on gpo.cloudschool.ai.

Event IDs worth knowing

IDLogMeaning
4624 / 4625SecurityLogon success / failure (shows NTLM version too)
4768 / 4769 / 4771Security (DC)Kerberos TGT requested / service ticket requested / pre-auth failed
4776Security (DC)NTLM credential validation
4740Security (PDC)Account locked out
4728 / 4732 / 4756Security (DC)Member added to a global / local / universal security group
5136Security (DC)Directory object modified (with Directory Service Changes auditing)
1311, 1925, 2042, 2087, 2088Directory ServiceReplication topology, connection and DNS lookup problems
2887 / 2889Directory ServiceUnsigned or cleartext LDAP binds
3074 / 3075Directory ServiceLDAP channel binding audit
5719 / 5722SystemNetlogon cannot find a DC / computer account authentication failed
8004NTLM operational (DC)NTLM authentication audited (for NTLM reduction)

For deeper inspection, see the Sysinternals for AD page.