Active Directory Health Check: What Should Periodic Maintenance Include?

Replication, DNS, FSMO roles, SYSVOL, time sync, account hygiene and system state backup: what to look at in periodic Active Directory maintenance, and with which command.
Technical summary
Technology
Active Directory, DNS, dcdiag, repadmin, DFSR
Topic
Directory service maintenance
Level
Intermediate
Prerequisites
  • Domain Admin or equivalent rights
  • Access to all domain controllers
In this article11 sections

When Active Directory breaks, the first call is “my password isn’t accepted.” Then shared folders won’t open, group policies aren’t applied, and Exchange or the ERP application gets stuck on authentication. Most of these failures don’t happen overnight: replication that has been failing for weeks, a wrongly configured DNS server or a drifting clock quietly build up. The check order below was written for a monthly or quarterly maintenance routine; at each step you’ll find what to look at and which errors to watch for.

1. Domain controller diagnostics

The starting point is dcdiag. Run it not on a single server but for all domain controllers (DCs) in the forest: dcdiag /e /c /v /f:C:\Bakim\dcdiag.txt. /e covers all DCs, /c runs the comprehensive test set and /v gives verbose output. Saving the output to a file lets you compare it with the previous maintenance.

Read the “failed test” lines in the output one by one. Some warnings come from the environment; for example, in a forest that never uses SMTP replication the related test may return a meaningless result. The problem is that a real error gets lost among these “usual” warnings. Keep the file and read the difference.

Alongside dcdiag, the event logs should be scanned: the Directory Service, DNS Server and DFS Replication logs. The first thing to look at in the console is error IDs that recur over the last 30 days. A one-off warning is usually unimportant. An error that appears at the same time every day is not.

2. Replication

Changes made on more than one controller need to reach each other. repadmin /replsummary shows the largest replication delta and error count for all DCs in a single table; repadmin /showrepl gives the last successful replication time and error code for each connection. In large environments, putting the repadmin /showrepl * /csv output into a spreadsheet and filtering it speeds things up.

A common scenario: a DC at a branch can’t replicate to head office for months and nobody notices, because users at that branch can still sign in. If this period exceeds the tombstone lifetime, the DC can no longer safely return to replication; there is a risk of lingering objects (deleted objects “coming back”), and the controller usually has to be forcibly removed and rebuilt. Replication errors are not left waiting.

  • Errors like 8524 / 1722 usually point to DNS or RPC connectivity; check name resolution and firewall rules first.
  • Access denied (5) errors are usually a computer account password or Kerberos/time problem.
  • For connections between sites, make sure site and subnet definitions are up to date; a client from an undefined subnet goes to the wrong DC.

3. DNS

Most Active Directory problems are actually DNS problems. Domain controllers’ network adapter settings should list only internal DNS servers; pointing to another DC as primary and to itself (127.0.0.1 or its own IP) as secondary is a common and healthy approach. Seeing a modem or public DNS address on a DC’s network adapter is a frequent configuration mistake.

  • The DNS client settings of the controllers should point to each other and to themselves in the right order
  • The SRV records the domain needs should be complete (check with dcdiag /test:dns and the _msdcs zone)
  • Records belonging to old or removed servers should be cleaned up (a scavenging plan)
  • Forwarders should be working for external name resolution

Don’t rush to enable scavenging. If a server that should have a static record was mistakenly registered with a dynamic one, it gets deleted in the first cleanup cycle. Review the timestamps of the records in the zone first, then set the intervals.

4. FSMO roles

Which controller holds each role (netdom query fsmo) should be documented, and those controllers should be verified as healthy. No role should be left on a removed or unreachable server. We usually see this after a DC refresh: the old server has been shut down, but the RID Master or Schema Master role is still registered to it.

If the role holder is running, transfer the role the normal way (Move-ADDirectoryServerOperationMasterRole). Seizing a role is done only when it is certain that the old holder will never return to the network. If it does, there will be a conflict.

5. SYSVOL and group policies

You should check that SYSVOL replication uses DFSR and that all controllers have the same content. The output of dfsrmig /getglobalstate should show the “Eliminated” state. Older FRS-based setups should be migrated to DFSR; current Windows Server versions don’t support SYSVOL replication with FRS, and this directly prevents adding a new DC.

Two kinds of clutter build up in group policies: GPOs not linked to any OU, and entries with files in SYSVOL but no object in AD (or the reverse). Unused or unlinked group policy objects should be reviewed and backed up before deletion (Backup-GPO -All).

6. Time synchronization

Kerberos authentication is sensitive to clock skew; the default tolerance is five minutes. The controller holding the PDC emulator role should sync with a reliable external time source, and the other controllers and clients through the domain hierarchy. Check the status with w32tm /query /status and w32tm /query /source; if you see “Local CMOS Clock” as the source, the configuration is incomplete.

On virtual controllers there must be no conflict with hypervisor time synchronization. A common picture: the PDC emulator is virtual, gets time from both the hypervisor and NTP, and the clock jumps every few minutes. Disabling the “Time synchronization” integration service for the PDC in Hyper-V, or turning off VMware Tools time sync in VMware, stops the oscillation.

7. Account hygiene

Old accounts are an attacker’s favorite way in. A VPN account left open for a departed employee can be used without raising an alarm. Checklist:

  • Disabling user and computer accounts that haven’t signed in for a long time (list them with Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00)
  • Checking that accounts of employees who have left are closed
  • Reviewing membership of highly privileged groups (Domain Admins, Enterprise Admins, etc.)
  • Listing service accounts with non-expiring passwords and identifying their owners

Don’t delete accounts directly. First disable them and move them to a separate OU, then wait one maintenance cycle. If an application depends on the account, the complaint comes in during that time and rolling back is a single click.

8. Backup and recovery readiness

A regular system state backup of at least one controller should be taken, and backups must not be older than the tombstone lifetime. Restoring from a backup older than the tombstone lifetime is not supported. Taking backups isn’t enough either; the restore step must have been tried at least once in a test environment.

The Active Directory Recycle Bin should be enabled; it makes it easier to recover accidentally deleted objects. It is off by default and cannot be turned off once enabled. You can see its status with Get-ADOptionalFeature -Filter 'Name -like "Recycle Bin Feature"'. Recovery steps should be in writing: which backup, which server, where the DSRM password is and when an authoritative restore is needed. If privileged accounts and delegation are to be reviewed alongside directory health, consider the scope of an Active Directory security audit.

9. Check frequency and ownership

You don’t need to do everything every month. A practical split looks like this:

  • Weekly: repadmin /replsummary, critical event log errors, backup job results
  • Monthly: full dcdiag, DNS records, time source, privileged group memberships
  • Quarterly: inactive account cleanup, GPO review, FSMO documentation
  • Yearly: restore test, service account inventory, lifecycle check of DC operating system versions

Every check should have an owner. A check without an owner doesn’t get done.

Maintenance report

The result, date and fixes made for each check should be collected in a short report. Keeping the dcdiag and repadmin output as attachments to the report answers “was this warning there before?” in seconds at the next maintenance. The report is both the starting point for the next maintenance and evidence in audits that IT operations are run regularly.

Frequently asked questions

Is a single domain controller enough?

It is not recommended. A failure on a single controller affects authentication, DNS and group policies at the same time. At least two controllers and regular system state backups are recommended.

If dcdiag shows no errors, is everything fine?

dcdiag is an important indicator, but it isn’t enough on its own. Replication status, event logs, DNS records, time synchronization and backups also need to be checked.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek System Support

Server installation, configuration, incident response and scheduled maintenance. Active Directory, virtualization and backup are managed with the same discipline.

Knowledge Center

Other articles