Learn What IT Pros Need to Know About Windows 11 - August 26th at 1 PM ET! Learn What IT Pros Need to Know About Windows 11 - August 26th at 1 PM ET!
Active Directory

Check a Domain Controller Configuration with the DCDiag Tool

How do I use the DCDiag tool to check a domain controller configuration?

After promoting a server to a domain controller (DC), or when you’re experiencing some problems with Active Directory – and suspecting a DC configuration issue – the dcdiag.exe command-line tool can be extremely useful.

There are 27 basic tests, including checking registration of DNS records, name resolution, AD replication, and Flexible Single Master Operations (FSMO) roles. If your DC fails any of the tests, it likely indicates a problem. To run the tool locally on a Windows Server 2012 DC, open an elevated PowerShell prompt, type dcdiag, and press ENTER.

Check DC config with DCDIAG

Useful DCDiag switches

To run DCDiag against a remote DC, specify the /s:<dcname> switch and replace <dcname> with the name of your DC. If necessary, you can also specify a username and password when executing dcdiag against the remote DC.

Sponsored Content

Read the Best Personal and Business Tech without Ads

Staying updated on what is happening in the technology sector is important to your career and your personal life but ads can make reading news, distracting. With Thurrott Premium, you can enjoy the best coverage in tech without the annoying ads.

​/s:<dc name> /u:<domain name>\<username> /p:<password>

Typing an asterisk (*) instead of your password in the command above will generate an additional prompt where you can enter the password for the specified user separately and the text will be hidden.

The /c switch initiates more thorough testing, most notably more comprehensive DNS testing. Before running dcdiag, especially if the DNS test results are of particular interest, you might want to flush the DC’s local DNS cache to ensure that any results the tool returns are resolved from a DNS server. The cache can be cleared by running ipconfig /flushdns.

The /v switch gives verbose output which can be useful when you need more information for troubleshooting purposes.

Failed tests

Useful as DCDiag is, sometimes it reports tests as failed when there may not be any problem. This is more likely to occur if you are running DCDiag from Windows Server 2012 against a variety of different versions of Windows Server. For instance, the FrsEvent test reads the event log for the file replication service, but access to the event log is blocked by default by Windows firewall in later versions of Windows Server. For a full list of potential issues with dcdiag tests, see Microsoft’s page on DCDIAG.EXE /E or /A or /C expected errors.

Related Topics:

BECOME A PETRI MEMBER:

Don't have a login but want to join the conversation? Sign up for a Petri Account

Register
Comments (0)

Leave a Reply

IT consultant, Contributing Editor @PetriFeed, and trainer @Pluralsight. All about Microsoft, Office 365, Azure, and Windows Server.

Register for Advanced Microsoft 365 Day!

GET-IT: Advanced Microsoft 365 1-Day Virtual Conference - Live August 24th!

Join us on Tuesday, August 24th and hear from Microsoft MVPs and industry experts about how to take advantage of Microsoft 365 at a technical level and dive deep into the features and functionality that will make your environment more secure and compliant.

RSVP Now

Sponsored By