Testing the health of your local domain controller can be an extremely important task, especially when problems with Active Directory arise. Let’s look at an important tool in the toolbelt for Active Directory administrators called DCDiag. It allows admins to check domain controller health and other metrics to ensure everything works properly in Active Directory Domain Services (AD DS).
Common Active Directory Errors and Issues
DcDiag can be very helpful when you need to quickly identify many common AD config and operational problems.
DNS Registration Failures
AD relies heavily on DNS. Missing/incorrect SRV, A, or CNAME records can prevent DCs from locating each other and may cause authentication, replication, and logon issues.
Replication Errors
Replication failures between DCs can lead to inconsistent AD data across the environment. DcDiag can help you to identify replication problems that may affect user accounts, Group Policy, and directory updates.
NetLogon Failures
The NetLogon service is responsible for DC registration and secure communication within AD. In case NetLogon is not functioning correctly, you may face a fail during DC discovery and authentication processes.
FSMO Role Connectivity Issues
DCs must be able to communicate with FSMO role holders. Keep in mind that connectivity problems can affect operations (such as RID allocation, time sync, and domain-wide admin tasks).
SYSVOL Replication Problems
SYSVOL contains Group Policy objects and logon scripts that must be replicated to all DCs. Note that replication problems can result in missing/outdated Group Policy settings across the domain.
Modern AD environments use DFS Replication (DFSR) for SYSVOL replication. While DCDiag can identify symptoms of SYSVOL replication problems, DFSR-specific troubleshooting often requires additional tools and logs.
Here are the common DFSR troubleshooting commands:
dfsrdiag replicationstate
dfsrdiag backlog
wmic /namespace:\\root\microsoftdfs path dfsrreplicatedfolderinfo get replicationgroupname,state
Note. WMIC is deprecated and may not be installed by default on newer versions of Windows Server/Windows 11. On Windows Server 2025, WMIC is available as a Feature on Demand and you need to install it manually.
The DFSRMIG tool allows you to check the current SYSVOL migration state (note that incomplete/stalled FRS-to-DFSR migrations can cause SYSVOL replication and Group Policy issues):
dfsrmig /getmigrationstate
dfsrmig /getglobalstate
You should also review the DFS Replication event log for replication errors and backlog issues.
Secure Channel Failures
Broken secure channels between DCs can cause authentication and replication problems. DcDiag can help you to identify trust and communication problems that require further investigation.
DCDiag commands
DCDiag commands (test) | Test description |
Advertising | Checks if the domain controller is correctly reporting itself and its role as the operations master. This test fails if the NetLogon service is not running. |
CheckSDRefDom | Verifies the correctness of the reference domain security descriptors for each section of the program directories. |
Connectivity | Checks DNS registration for each domain controller; sends a test echo packet to each domain controller and verifies LDAP connections to each domain controller, and RPC connections. |
CrossRefValidation | Checks the correctness of cross-references for domains. |
FrsSysVol | Checks readiness status for legacy FRS SYSVOL replication environments. |
FRSEvent | Checks for replication errors in the legacy File Replication Service (FRS). |
FSMOCheck | Check the global catalog server, primary domain controller, preferred time server, and KDC. |
Intersite | Checks for errors that may interfere with normal replication between AD sites. Microsoft warns that sometimes this test may not be accurate. |
KnowsOfRoleHolders | Checks the ability to connect domain controllers to all five FSMO role holders. |
MachineAccount | Verifies the correctness of the registration of the account of the target computer and the correctness of the service announcements of this computer. |
NCSecDesc | Verifies permissions for replication in security descriptors for naming context headers. |
NetLogons | Verifies the registration permissions that allow registration for each domain controller. |
ObjectsReplicated | Verifies the replication of the directory server agent and computer account objects. |
OutboundSecureChannels | Checks the presence of secure channels between all domain controllers in the domain. |
Replications | Checks replication between domain controllers and reports all replication errors. |
RidManager | Checks the operability and availability of the RID master. |
Services | Verifies the health of all services required for the operation of the ADDS on the specified domain controller. |
| SystemLog | Checks the System event log for errors and warnings that may indicate DC, service, driver, or OS problems. |
VerifyEnterpriseReferences | Checks the validity of the system links of the file replication service for all objects on all domain controllers in the forest. |
VerifyReferences | Checks the validity of the file replication service system references for all objects on the specified domain controller. |
VerifyReplicas | Checks the validity of all sections of the application directory on all servers involved in the replication. |
Topology | Checks if the KCC generates the correct topology for all domain controllers. |
CutoffServers | Checks if there are replication servers without a partner. |
DNS | Includes six additional DNS (see below). |
DcPromo | Checks the DNS infrastructure for any computer that you want to promote to a domain controller. If the infrastructure meets the requirements, you can install the ADDS domain controller role on the computer. |
Note. FRS-based SYSVOL replication is deprecated. In modern AD environments you should use DFS Replication (DFSR) instead.
DCDiag syntax
The general syntax of the DcDiag utility is:
dcdiag [/s:<DomainController>] [/n:<NamingContext>] [/u:<Domain>\<UserName> /p:{* | <Password> | ""}] [{/a | /e}] [{/q | /v}] [/i] [/f:<LogFile>] [/c [/skip:<Test>]] [/test:<Test>] [/fix] [{/h | /?}] [/ReplSource:<SourceDomainController>] Useful Examples of DcDiag Command
It is recommended to run the DcDiag test on the domain controller itself, and not remotely. For example, letโs run a check on a DC01 domain controller:
dcdiag /s:DC01
By default, DcDiag runs a standard set of DC diagnostic tests. Note that the exact number of tests may vary (it depends on the Windows Server version and installed roles). In our example, it is clear that all tests passed successfully (Starting test: โฆ. passed test). It means that everything is fine on this DC.

The test results will show Passed if the test was successful and DcDiag found no errors. The Failed message will appear next to the check name if an error is found.

Hint. Note that you are likely to encounter warning events when running DcDiag tests remotely. Tests such as SystemLog will fail unless you run dcdiag.exe locally on a domain controller.
General health check
DcDiag allows you to perform a quick general health test of Active Directory and domain controllers. To check all DCs in the domain, use the /e parameter. The following command will only list errors that require the AD administratorโs attention:
dcdiag /e /q
The following command runs a more comprehensive set of tests than the default DCDiag execution:
dcdiag /c
The command below displays detailed information for each test:
dcdiag /c /v
Verifying AD Replication
While DCDiag validates the overall health of DCs, Repadmin provides detailed AD replication diagnostics. Here are the commands you need:
repadmin /replsummary
repadmin /showrepl
repadmin /showrepl *
repadmin /queue
You can use these commands to identify replication failures, replication latency, and communication problems between DCs. Note that you should always check replication health when troubleshooting AD problems.
repadmin /queue displays pending replication operations waiting to be processed by the DC.
Note that you should use repadmin /showrepl for a specific DC and repadmin /showrepl * only in case you need replication details from all DCs.
Recommended AD Health Check
For routine AD monitoring, you can use the following commands to quickly identify DC and replication issues:
dcdiag /e /q
dcdiag /test:DNS
repadmin /replsummary
Get-ADReplicationFailure -Scope Forest
dfsrmig /getmigrationstate
The migration state should be Eliminated (Global State 3) and all DCs should report that they have reached the target state.
Note. In large enterprise forests with dozens/hundreds of DCs, the /e switch may take considerable time to complete and can generate a large amount of output. You should consider targeting specific domains, sites, or DCs when troubleshooting localized issues.
Here are the key notes:
- dcdiag /e /q โ runs diagnostics against all DCs in the forest;
- dcdiag /test:DNS โ validates DNS registration, SRV records, dynamic updates, and other DNS-related issues that commonly affect AD authentication and replication.
- repadmin /replsummary โ provides a replication health summary across all DCs;
- Get-ADReplicationFailure -Scope Forest โ lists AD replication failures detected in the forest.
- dfsrmig /getmigrationstate โ verifies the current SYSVOL migration state and helps you to identify incomplete/stalled FRS-to-DFSR migrations.
Running these commands regularly can help you to detect AD health problems before they impact users/services.
Specific tests
You can perform a specific AD test only by specifying its name, for example:
dcdiag /s:DC01 /a /test:NetLogons
Testing the RID master
You can test the health of the RID master FSMO owner in the domain:
Dcdiag.exe /TEST:RidManager /v
Performing a specific test from the checklist
Or you can exclude a specific test from the checklist:
dcdiag /s:DC01 /a /skip:Replication
Specifying credentials
When launching the DcDiag tool remotely, you need to specify the credentials with the domain admin privileges:
dcdiag /s:DC01 /u:CONTOSO\contosoadmin /p:*
The * character prompts for the password securely instead of exposing it in the command history.
Saving the Results to a File
In order to display the extended information and save the test results to files, use the command:
dcdiag /s:DC01 /v /f:c:\ps\dcdiag_report.log
Testing all Domain Controllers in the Current Site
To test all domain controllers in the current Active Directory site, run the command:
dcdiag /s:DC01 /a
Remove Extra Information
If you want to remove the extra information from the test results to display only the errors found, use the /q parameter (if no errors were found, the command will return nothing):
dcdiag /s:DC01 /q

Fixing Errors with DCDIag
The /fix switch has very limited functionality and is primarily used with the MachineAccount test to correct certain DC service principal name (SPN) registration issues. Most AD replication, DNS, SYSVOL, DFSR, and config problems still require manual remediation. Here is the command to use the /fix switch:
dcdiag /s:DC01 /fix
Re-register DNS Records After Fixing DNS Issues
In environments where DCDiag reports DNS registration problems, you may need to manually refresh DNS registrations after running the /fix option:
ipconfig /registerdns
net stop netlogon
net start netlogon
nltest /dsregdns
The ipconfig /registerdns command forces the DC to re-register its DNS records. Keep in mind that restarting the NetLogon service triggers registration of the domain controller’s SRV records in DNS. The nltest /dsregdns command can also be used to force a DC to register its DNS records, including SRV records required for DC discovery and AD services.
After performing these steps, you need to rerun the DNS diagnostics to check if the registration issues have been resolved:
dcdiag /test:DNS
The following command is one of the most useful DNS tests when troubleshooting missing SRV records and DC discovery issues:
dcdiag /test:DNS /DnsRecordRegistration
Testing Active Directory Domain Controllers using DCDiag
Using the DNS tests, you can perform primary tests testing server name resolution service in AD. For example, to run all DNS tests for a specific domain controller and export the result to a text file:
DCDiag /Test:DNS /e /v /s:dc01.theitbros.com >c:\logs\DcdiagDNSCheck.txt
Open the resulting DNS test log file:
Get-Content c:\logs\DcdiagDNSCheck.txt
The result of each DNS test is listed in a column under the โSummary of DNS test resultsโ section. In this example, all DNS tests passed successfully (PASS), except for the DNS forwarding test (FAIL):

You can only run certain DNS tests:
dcdiag /test:DNS [/DnsBasic | /DnsForwarders | /DnsDelegation | /DnsDynamicUpdate | /DnsRecordRegistration | /DnsResolveExtName [/DnsInternetName:<InternetName>] | /DnsAll] [/f:<LogFile>] [/x:<XMLLog.xml>] [/xsl:<XSLFile.xsl> or <XSLTFile.xslt>] [/s:<DomainController>] [/e] [/v]
/DnsBasic | Basic DNS tests, connectivity, DNS client configuration, service availability, presence of a domain zone |
/DnsForwarders | DnsBasic Tests and DNS Forwarding |
/DnsDelegation | DnsBasic Tests and delegation verification |
/DnsDynamicUpdate | Tests DnsBasic and checks if dynamic update is enabled for an Active Directory zone |
/DnsRecordRegistration | DnsBasic tests and also checks if A records, CNAMEs, and SRV services are registered. In addition, an inventory report is generated based on the test results. |
/DnsResolveExtName **[/DnsInternetName:<**InternetName>] | DnsBasic tests and resolves the InternetName. If DnsInternetName is not specified, the tool attempts to resolve www.microsoft.com address. If DnsInternetName is specified, it resolves the specified InternetName. |
Here are the most commonly used DNS Tests:
dcdiag /test:DNS
dcdiag /test:DNS /DnsBasic
dcdiag /test:DNS /DnsRecordRegistration
Note that DnsRecordRegistration is especially useful when you need to troubleshoot missing SRV records and DC discovery problems.
Note that DNS issues are one of the most common causes of AD authentication, replication, and DC discovery problems. As a best practice, you should include DNS testing as part of your regular AD health checks. The /test:DNS option runs a comprehensive set of DNS diagnostics, while /DnsBasic performs a quicker validation of core DNS functionality.
Wrapping up
DCDiag should be one of the first tools used when troubleshooting AD issues. However, DCDiag alone does not provide a complete picture of AD health. You should use DCDiag together with Repadmin, DFSRDiag, Event Viewer, DNS diagnostics, and PowerShell AD replication cmdlets for comprehensive AD health monitoring to effectively troubleshoot replication, authentication, and DC issues.
What is DcDiag and why is it important?
DcDiag (Domain Controller Diagnostic Tool) is a command-line utility used to verify the health of Active Directory Domain Controllers. It helps administrators detect problems related to DNS, replication, authentication, SYSVOL, FSMO roles, services, and other AD components before they affect users or business services.
How do I run a basic health check on a domain controller?
Run the following command directly on the domain controller:
dcdiag
This performs a standard set of diagnostic tests and reports whether each test passed or failed.
What are the most common Active Directory problems that DcDiag can detect?
DcDiag can help identify:
- DNS registration failures
- Active Directory replication errors
- NetLogon service issues
- FSMO role connectivity problems
- SYSVOL replication failures
- Secure channel issues between domain controllers
- Service and event log errors
- AD topology and replication partner problems
Which DcDiag tests are the most important?
Some of the most commonly used tests include:
| Test | Purpose |
|---|---|
| Connectivity | Verifies DNS, LDAP, RPC, and network connectivity |
| DNS | Checks DNS configuration and registration |
| Replications | Validates AD replication health |
| NetLogons | Verifies NetLogon registrations |
| Services | Checks required AD DS services |
| FSMOCheck | Validates FSMO role accessibility |
| RidManager | Checks RID Master functionality |
| SystemLog | Reviews system event log errors |
| Advertising | Confirms the DC is properly advertising itself |
Why do some DcDiag tests fail when run remotely?
Certain tests, especially SystemLog, often require local access to the domain controller. Running DcDiag remotely may generate warnings or incomplete results because the tool cannot access all required resources.
