[R] DCDIAG debug switch

Reading Time: 2 minutes

Brett Shirley on in one of a threads on activedir.org mailing list mentioned one .additional. switch which can be used in conjunction with dcdiag.exe command. DCDIAG is well known and extremely useful diagnostic tool used in many different Active Directory troubleshooting aspects to get information about current view of AD. When You will use /? switch to get usage help You will not find there /d option mentioned by Brett. In most cases d in command line is for debug and this means the same in this case. When You are using dcdiag.exe with /d switch You will get many additional information related to DC role and replication at the beginning of DCDIAG output. Standard output of DCDIAG starts like this:

 C:\>dcdiag /test:DNS Domain Controller Diagnosis Performing initial setup: Done gathering initial info. Doing initial required tests 

but with /d switch it is a little longer (I.ve shortened this output a little):

 Domain Controller Diagnosis Performing initial setup: * Verifying that the local machine CORPODC, is a DC. * Connecting to directory service on server CORPODC. CORPODC.currentTime = 20051013202642.0Z CORPODC.highestCommittedUSN = 33047 CORPODC.isSynchronized = 1 CORPODC.isGlobalCatalogReady = 1 * Collecting site info. * Identifying all servers. CORPODC.currentTime = 20051013202642.0Z CORPODC.highestCommittedUSN = 33047 CORPODC.isSynchronized = 1 CORPODC.isGlobalCatalogReady = 1 * Identifying all NC cross-refs. * Found 1 DC(s). Testing 1 of them. Done gathering initial info. ===============================================Printing out pDsInfo GLOBAL: ulNumServers=1 pszRootDomain=corponet.company.pl pszNC= pszRootDomainFQDN=DC=corponet,DC=company,DC=pl pszConfigNc=CN=Configuration,DC=corponet,DC=company,DC=pl pszPartitionsDn=CN=Partitions,CN=Configuration,DC=corponet,DC=company,D iSiteOptions=0 dwTombstoneLifeTimeDays=180 dwForestBehaviorVersion=0 HomeServer=0, CORPODC SERVER: pServer[0].pszName=CORPODC pServer[0].pszGuidDNSName=1ffc0b3d-eaa0-4c41-9500-fa959b2e3794._msdcs.corponet. pServer[0].pszDNSName=CORPODC.corponet.company.pl pServer[0].pszDn=CN=NTDS Settings,CN=CORPODC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configura pServer[0].pszComputcompanyccountDn=CN=CORPODC,OU=Domain Controllers,DC=corponet,DC=company,DC=pl pServer[0].uuidObjectGuid=1ffc0b3d-eaa0-4c41-9500-fa959b2e3794 pServer[0].uuidInvocationId=1ffc0b3d-eaa0-4c41-9500-fa959b2e3794 pServer[0].iSite=0 (Default-First-Site-Name) pServer[0].iOptions=1 pServer[0].ftLocalAcquireTime=6c5f5130 01c5d034 pServer[0].ftRemoteConnectTime=6c132d00 01c5d034 pServer[0].ppszMasterNCs: (.) SITES: pSites[0].pszName=Default-First-Site-Name pSites[0].pszSiteSettings=CN=NTDS Site Settings,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=corponet,DC=co pSites[0].pszISTG=CN=NTDS Settings,CN=CORPODC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configura pSites[0].iSiteOption=0 pSites[0].cServers=1 NC: pNCs[0].pszName=ForestDnsZones pNCs[0].pszDn=DC=ForestDnsZones,DC=corponet,DC=company,DC=pl pNCs[0].aCrInfo[0].dwFlags=0x00000201 pNCs[0].aCrInfo[0].pszDn=CN=4c595128-5676-4aec-be09-606594cacdee,CN=Partitions, (.) 5 NC TARGETS: ForestDnsZones, DomainDnsZones, Schema, Configuration, 1 TARGETS: CORPODC, =============================================Done Printing pDsInfo 

So as You can see this is a lot of useful information about DC and naming contexts. Sometimes this information can be useful when You are reviewing output off site and You can.t check it on Your own. So I think it.s good to remember about this /d switch.