CmdID

CmdID / Commands

dcdiag

DCDiag.exe analyzes the state of domain controllers (DC) in a forest or enterprise and reports any problems to help in troubleshooting. Windows commands reference

On Windows File dcdiag.exe

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from the Windows commands reference, CC BY 4.0

DCDiag.exe analyzes the state of domain controllers (DC) in a forest or enterprise and reports any problems to help in troubleshooting. As an end-user reporting program, DCDiag is a command-line tool that encapsulates detailed knowledge of how to identify abnormal behavior in the system. By default, DCDiag is readily available if logged into a DC. An alternative method to access DCDiag is to install the Remote Server Administration Tools (RSAT) on your device. DCDiag must be ran with administrative rights from an elevated command prompt (CMD) or PowerShell. DCDiag consists of a framework for executing tests and a series of tests to verify different functional areas of the system. This framework selects which DC is tested according to scope directives from the user, such as enterprise, site, or single server. Testing the overall connectivity and responsiveness of the DC includes verifying: - The DC can be located in DNS - The DC responds to Internet Control Message Protocol (ICMP) pings - The DC allows Lightweight Directory Access Protocol (LDAP) connectivity by binding to the instance - The DC allows binding to the AD RPC interface using the DsBindWithCred function. NOTE: Blocking ICMP prevents DCDiag from functioning as intended. While blocking ICMP is recommended at the Internet-edge of your network, internally blocking ICMP traffic leads to administrative issues that break legacy group policies, black hole router detection, or inefficient MTU sizes due to lack of a discovery option. Troubleshooting tools such as ping.exe or tracert.exe are also affected.

To run a series of connectivity tests on the local domain, run the following command

dcdiagIdentify

A successful connectivity test output

Directory Server Diagnosis Performing initial setup: Trying to find home server... Home Server = MapleWaffle-WS22 * Identified AD Forest. Done gathering initial info. Doing initial required tests Testing server: Default-First-Site-Name\MAPLEWAFFLE-WS2 Starting test: Connectivity ......................... MAPLEWAFFLE-WS2 passed test Connectivity Doing primary tests Testing server: Default-First-Site-Name\MAPLEWAFFLE-WS2 Starting test: Advertising ......................... MAPLEWAFFLE-WS2 passed test Advertising Starting test: FrsEvent ......................... MAPLEWAFFLE-WS2 passed test FrsEvent Starting test: DFSREvent ......................... MAPLEWAFFLE-WS2 passed test DFSREvent Starting test: SysVolCheck ......................... MAPLEWAFFLE-WS2 passed test SysVolCheck Starting test: KccEvent ......................... MAPLEWAFFLE-WS2 passed test KccEvent Starting test: KnowsOfRoleHolders ......................... MAPLEWAFFLE-WS2 passed test KnowsOfRoleHolders Starting test: MachineAccount ......................... MAPLEWAFFLE-WS2 passed test MachineAccount Starting test: NCSecDesc ......................... MAPLEWAFFLE-WS2 passed test NCSecDesc Starting test: NetLogons ......................... MAPLEWAFFLE-WS2 passed test NetLogons Starting test: ObjectsReplicated ......................... MAPLEWAFFLE-WS2 passed test ObjectsReplicated Starting test: Replications ......................... MAPLEWAFFLE-WS2 passed test Replications Starting test: RidManager ......................... MAPLEWAFFLE-WS2 passed test RidManager Starting test: Services ......................... MAPLEWAFFLE-WS2 passed test Services Starting test: SystemLog ......................... MAPLEWAFFLE-WS2 passed test SystemLog Starting test: VerifyReferences ......................... MAPLEWAFFLE-WS2 passed test VerifyReferences Running partition tests on : ForestDnsZones Starting test: CheckSDRefDom ......................... ForestDnsZones passed test CheckSDRefDom Starting test: CrossRefValidation ......................... ForestDnsZones passed test CrossRefValidation Running partition tests on : DomainDnsZones Starting test: CheckSDRefDom ......................... DomainDnsZones passed test CheckSDRefDom Starting test: CrossRefValidation ......................... DomainDnsZones passed test CrossRefValidation Running partition tests on : Schema Starting test: CheckSDRefDom ......................... Schema passed test CheckSDRefDom Starting test: CrossRefValidation ......................... Schema passed test CrossRefValidation Running partition tests on : Configuration Starting test: CheckSDRefDom ......................... Configuration passed test CheckSDRefDom Starting test: CrossRefValidation ......................... Configuration passed test CrossRefValidation Running partition tests on : corp Starting test: CheckSDRefDom ......................... corp passed test CheckSDRefDom Starting test: CrossRefValidation ......................... corp passed test CrossRefValidation Running enterprise tests on : corp.contoso.com Starting test: LocatorCheck ......................... corp.contoso.com passed test LocatorCheck Starting test: Intersite ......................... corp.contoso.com passed test Intersite

To run a series of connectivity tests on a specific domain controller, run the following command

dcdiag /s:<DomainControllerName>Identify
/sSpecifies the name of the server to run the command against. Windows commands reference

DCDiag is able to save the output results to a text file by running

dcdiag /s:<DomainControllerName> /f:<FileName.txt>Identify
/sSpecifies the name of the server to run the command against. Windows commands reference
/fRedirects all output to a log file. Windows commands reference

To save to a specific location, run

dcdiag /s:<DomainControllerName> /f:<DriveLetter>\<FilePath>\<FileName.txt>Identify
/sSpecifies the name of the server to run the command against. Windows commands reference
/fRedirects all output to a log file. Windows commands reference