$ cat is-active-directory-actually-healthy

Operations

Is Active Directory Actually Healthy?

A practical Active Directory health check using DCDIAG, REPADMIN, DNS diagnostics, replication status, queues, and topology checks.

Active Directory has an impressive ability to keep working while quietly accumulating reasons why it shouldn’t.

A user can log on, a file share can open, and Group Policy can mostly apply while replication has been unhappy for days and one domain controller has developed opinions about DNS.

That is why, when I want to know whether an Active Directory environment is actually healthy, I don’t start by clicking randomly through administrative consoles. I start with a small set of command-line tools that tell me what the domain controllers, replication engine, and DNS configuration think is happening.

This is not intended to catalog every switch for dcdiag, repadmin, or dsquery. It is the practical sequence and command set I keep around when I want a reasonably quick look at AD health before deciding where to dig deeper.

Run the diagnostic tools from an elevated Command Prompt or PowerShell session with credentials appropriate for the domain controllers being examined.

Start With DCDIAG

dcdiag is the obvious place to begin. It exercises a collection of domain-controller tests and reports conditions that deserve attention.

For a broad, verbose pass across the enterprise, I commonly start with:

dcdiag /c /e /v

That is intentionally noisy.

The point of the first pass is not necessarily to admire several screens of output. I want to know whether there is an obvious pattern: one domain controller failing multiple tests, DNS problems appearing everywhere, connectivity failures, or something else that tells me which direction to investigate.

For a less ambitious look at the local domain controller:

dcdiag /v

Once the broad test tells me where the smoke is coming from, I would rather run targeted tests than keep rereading a wall of verbose output and hoping enlightenment occurs.

DNS Deserves Its Own Inspection

Active Directory and DNS are sufficiently intertwined that DNS gets its own section rather than being treated as an afterthought.

A verbose DNS test across the domain controllers can be written to a file for easier review:

dcdiag /test:DNS /e /v > C:\dns.txt

To test registration for a particular DNS domain:

dcdiag /test:RegisterInDns /DnsDomain:example.com

Other useful DNS-focused tests from my notes include:

dcdiag /test:dns /dnsrecordregistration /v
dcdiag /test:dns /dnsdynamicupdate /v

And I normally include a Netlogon check when symptoms suggest the DC locator, registration, or authentication plumbing deserves attention:

dcdiag /test:netlogons

DNS is not always the problem.

This is technically true.

Replication: Start With the Summary

After basic domain-controller health, I want to know whether AD replication is behaving.

The fastest first look is:

repadmin /replsummary

This gives me a concise replication-health summary and makes it much easier to spot domain controllers reporting inbound or outbound failures.

When I want failures prioritized by the amount of time since successful replication:

repadmin /replsum * /bysrc /bydest /sort:delta

A healthy summary does not prove that every aspect of AD is perfect, but an unhealthy one gives me something concrete to investigate immediately.

Look at the Replication Partners

Once the summary gives me a reason to look closer, showrepl is usually next:

repadmin /showrepl *

For a quicker failure-oriented view:

repadmin /showrepl * /errorsonly

For an individual domain controller or directory partition, I can narrow the query further. One form from my working notes is:

repadmin /showrepl site:Default-First-Site-Name DC=example,DC=com

The point is to move from “replication has a problem” to the source/destination relationship and directory partition involved.

Replication problems may originate with either domain controller or with something underneath AD entirely, including basic network connectivity. That is why I resist the temptation to treat every replication error as a replication-engine problem.

Check the Replication Queue

If replication appears delayed or stuck, inspect the queue:

repadmin /queue *

or for the local target:

repadmin /queue

A queue is useful evidence. It is not an invitation to hammer the environment repeatedly with synchronization commands until the error message changes.

That is troubleshooting by slot machine.

Synchronizing Replication

There are times when manually triggering replication is appropriate, particularly after correcting the underlying problem.

My notes include:

repadmin /syncall /e

and:

repadmin /syncall /APeD

I treat forced synchronization as a tool, not as the first diagnostic step. If replication is failing because DNS, RPC connectivity, authentication, or topology is broken, repeatedly requesting more replication does not repair the cause.

KCC and Replication Topology

The Knowledge Consistency Checker builds and maintains the AD replication topology. If I need the KCC to recalculate topology on targeted domain controllers, the command in my notes is:

repadmin /kcc *

Topology-related information can also be examined with:

repadmin /bridgeheads * /verbose

and:

repadmin /istg * /verbose

Another useful diagnostic view is the KCC failure cache:

repadmin /failcache *

These are not commands I run merely because they exist. If the initial health and replication checks are clean, there is little value in disturbing a working topology in search of something exciting to fix.

A quiet Tuesday is a valid technical outcome.

Domain Controllers: Know What You Are Testing

For a quick list of domain controllers in Active Directory, I have this in the old notes:

dsquery server -o rdn

This is basic, but useful. A health check is easier when I know which domain controllers should exist before interpreting commands that summarize “all” of them.

Replication Calls and Additional Detail

A few additional repadmin commands have been useful when the situation calls for them.

To display outbound replication calls that have not yet completed:

repadmin /showoutcalls *

To inspect replication-related backup information:

repadmin /showbackup *

My old notes also include:

repadmin /showtrust *

and:

repadmin /bind *

These are deeper-dive tools rather than part of my minimum first-pass health check. I keep them here because once troubleshooting moves beyond the initial summary, having the next command nearby is considerably better than remembering that I wrote it down somewhere in 2014.

A Practical First-Pass Sequence

If I am approaching an environment cold, I generally want to answer the questions in this order.

1. Do the domain controllers basically look healthy?

dcdiag /c /e /v

I am looking for patterns rather than treating every warning as an independent catastrophe.

2. Is replication healthy?

repadmin /replsummary

If there are failures, I want to know which DCs are involved and whether the problem is inbound, outbound, or widespread.

3. What does the actual replication relationship look like?

repadmin /showrepl * /errorsonly

If that identifies a specific failure, I can stop asking the whole forest what is wrong and begin investigating the affected systems.

4. Is DNS implicated?

dcdiag /test:DNS /e /v

At this stage I am looking for registration, resolution, or dynamic-update problems that correspond to the replication or DC-health symptoms already observed.

5. Is work backing up?

repadmin /queue *

That helps distinguish “there was an error” from “replication work is continuing to accumulate.”

6. Only then start forcing things

After correcting the cause, I may trigger replication or ask KCC to recalculate topology where appropriate.

The order matters.

A diagnostic command tells me something. A corrective command changes something. I prefer to understand the former before becoming enthusiastic about the latter.

What Healthy Actually Means

There is no single command that stamps HEALTHY on an Active Directory forest and absolves the administrator from thinking.

What I want from a health check is a consistent story:

  • Domain controllers pass the important DCDIAG tests.
  • Replication summaries do not show unexplained failures.
  • Individual replication partners are succeeding.
  • Queues are not accumulating unexpectedly.
  • DNS registration and dynamic updates are working as expected.
  • Netlogon and DC-location plumbing are functioning.
  • The topology makes sense for the environment I am examining.

If those pieces agree, I have considerably more confidence in the environment than I would get from “users haven’t complained today.”

The absence of tickets is not monitoring.

It is merely quiet.

References