Periodic domain controller (DC) health checks help administrators catch replication failures, DNS misconfigurations, and service outages before they affect authentication across the domain. Windows provides DCDiag, repadmin, and the Get-ADDomainController PowerShell cmdlet to run these checks. This article covers how to use each tool from an elevated PowerShell session, how to view DC information through Active Directory Users and Computers (ADUC), and how ADManager Plus provides centralized DC reporting without requiring command-line access.
DCDiag and repadmin are command-line tools that can be called directly from an elevated PowerShell window. Get-ADDomainController is a native PowerShell cmdlet and requires the Active Directory module to be loaded.
Import-Module ActiveDirectory
Get-ADDomainController -Filter *
dcdiag
dcdiag /e
repadmin /replsummary
repadmin /showrepl <DC-FQDN>
repadmin /syncall /Aped
netdom query fsmo
$services = 'Active Directory Domain Services',
'Kerberos Key Distribution Center',
'NetLogon',
'W32Time',
'DFS Replication'
foreach ($svc in $services) {
Get-Service -Name $svc | Select-Object Name, Status
}
To target a specific health area, use DCDiag with the /test parameter. The examples below cover the most critical checks.
Runs only the replication test to identify DCs that have not received changes from their partners within the expected interval.
dcdiag /test:Replications
Tests whether the DC has correctly registered its DNS A record and required SRV records, including _ldap._tcp and _kerberos._tcp.
dcdiag /test:DNS
Checks that the services required for AD DS to function—including NTDS, Net Logon, and KDC—are running on the DC.
dcdiag /test:Services
Confirms the DC is correctly advertising itself in DNS and that other domain members can locate it through normal service location lookups.
dcdiag /test:Advertising
Verifies that the Net Logon service has the permissions it needs to register DNS records and authenticate domain members.
dcdiag /test:NetLogons
Checks that SYSVOL is being replicated correctly and that the SYSVOL and NETLOGON shares are accessible on the DC.
dcdiag /test:SysVolCheck
Verifies that the DC can reach its replication partners over the network and that LDAP and RPC connections can be established.
dcdiag /test:Connectivity
Tests whether the DC can locate all five FSMO role holders in the domain and forest.
dcdiag /test:KnowsOfRoleHolders
This retrieves all disabled computers in a specific OU and passes them through the pipeline to Enable-ADAccount:
Get-ADComputer -Filter {Enabled -eq $false} -SearchBase "OU=Workstations,DC=example,DC=com" | Enable-ADAccount
This reads a CSV file containing a sAMAccountName column and enables each listed computer account:
Import-Csv -Path "C:\computers.csv" | ForEach-Object { Enable-ADAccount -Identity $_.sAMAccountName }
This runs the operation in simulation mode using -WhatIf to show which accounts would be affected without making any changes:
Get-ADComputer -Filter {Enabled -eq $false} -SearchBase "OU=Workstations,DC=example,DC=com" | Enable-ADAccount -WhatIf
This uses the -Server parameter to target a domain controller (DC) in a remote domain, with alternate credentials supplied via -Credential:
Enable-ADAccount -Identity "JohnS-1001" -Server "dc01.remotedomain.com" -Credential (Get-Credential)
| Parameter | Description |
|---|---|
| -Filter | Retrieves DCs matching the specified filter expression; use -Filter * to return all DCs in the domain. |
| -Identity | Specifies the DC to retrieve by DNS host name, GUID, IP address, or server object name. |
| -Discover | Uses the DCLocator mechanism to find an available DC without targeting a specific host. |
| -Site | Used with -Discover to limit DC discovery to a specific AD site. |
| -Service | Used with -Discover to return a DC providing a specific role, such as GlobalCatalog, KDC, or TimeService. |
| -DomainName | Used with -Discover to locate a DC in a named domain rather than the current domain. |
| -Server | Specifies the AD DS instance to connect to when running the query. |
| -Credential | Specifies alternate credentials for running the command. |
| /test:<TestName> | Runs a specific named test. Supported tests include Replications, DNS, Services, Advertising, NetLogons, SysVolCheck, Connectivity, and KnowsOfRoleHolders, among others. |
| /e | Extends the test run to every DC in the enterprise; without this flag, tests run only against the local DC or the DC specified by /s. |
| /s:<ServerName> | Runs tests against a remote DC specified by host name. |
| /q | Runs in quiet mode, reporting only errors and warnings rather than full output. |
| /f:<LogFile> | Redirects all output to a specified log file for offline review. |
| /replsummary | Displays a summary of replication status for all DCs, including failure counts per DC and naming context. |
| /showrepl <DC-FQDN> | Shows detailed per-partner replication status for the specified DC, including last attempt time and error codes. |
| /syncall /Aped | Forces domain-wide replication across all DCs; the flags control sync scope, error handling, and output format. |
ADUC does not provide diagnostic health check capabilities for DCs. It allows administrators to browse the Domain Controllers OU and view the properties of individual DC computer objects, but it cannot run diagnostic tests, report replication status, check service states, or display FSMO assignments in a health context.
For replication status, service health, DNS validation, and FSMO role placement, DCDiag, repadmin, and netdom must be used from an elevated command session as described in the PowerShell section above.
ADManager Plus includes a built-in Domain Controllers report that provides a centralized, exportable inventory of all DCs registered across managed domains, accessible from a browser without command-line tools or module installation.
The report displays all DCs in the domain with their registered properties. To export, click the export button and select CSV, PDF, HTML, CSVDE or XLSX. To configure recurring delivery, click Schedule, set the frequency, and specify the recipient email addresses.
For reports targeting additional DC or computer attributes, navigate to Reports > Computer Reports to access the full set of prebuilt options, or use custom reports to define a tailored report layout.
ADManager Plus streamlines reporting and eliminates the need for scripting, providing a single interface for AD management tasks across managed domains.
This failure indicates that the DC has not received directory changes from one or more replication partners within the expected interval. Run repadmin /showrepl <DCName> to identify which partner is failing and note the error code. Error 1722 (RPC server unavailable) points to a firewall or DNS resolution issue between replication partners. Error 8453 indicates that replication access was denied. Check the destination DC, the initiating account, and permissions on the affected naming context before attempting another sync. Resolve the underlying cause before forcing replication with /syncall.
A high failure count usually means one or more DCs have been unreachable for an extended period or that a specific naming context has a persistent replication error. Run repadmin /showrepl * to get per-partner details across all DCs, verify that affected DCs are online and that their Active Directory Domain Services (NTDS) service is running, and check whether the failures are concentrated on a single partner or spread across multiple.
When a DC is missing _ldap._tcp or _kerberos._tcp SRV records in the DNS zone, other domain members and DCs cannot locate it through normal AD service location. Restart the Net Logon service on the affected DC to force SRV record re-registration: run net stop netlogon followed by net start netlogon, then re-run dcdiag /test:DNS to confirm the records are present.
This typically means the machine running the cmdlet cannot reach a domain controller over the network, or that DNS is not resolving the domain name correctly. Verify network connectivity to the domain, confirm that the DNS SRV records for the domain are present, and ensure the Active Directory Web Services (ADWS) service is running on the target DC.
An advertising failure means the DC is not registering itself correctly in DNS or that the Net Logon service has stopped. Confirm that the Net Logon service is running on the affected DC, that its DNS A record and _ldap._tcp SRV records are present in the forward lookup zone, and that the DC's computer account in AD is not disabled.
Verify the DC is online, that RPC Endpoint Mapper (port 135) and the required dynamic high-range ports are reachable from the replication source, and that the NTDS service is running on the target. If the DC has been offline beyond the tombstone lifetime of the domain (180 days by default in Windows Server 2008 and later environments), a standard sync cannot recover it and additional domain recovery steps are required.
ADManager Plus provides a centralized reporting layer for domain controller inventory and AD computer management, accessible through a web browser without command-line access or module installation on the administrator's workstation.
Use the /s parameter to specify the target DC by host name: dcdiag /s:<DCName>. This can be combined with specific test flags—for example, dcdiag /s:<DCName> /test:DNS runs only the DNS test against that DC. To test all DCs in the domain simultaneously, use dcdiag /e. Both flags can be used from an elevated PowerShell session on any machine with RSAT installed.
Run netdom query fsmo from an elevated Command Prompt or PowerShell session. This returns all five FSMO roles—Schema Master, Domain Naming Master, PDC Emulator, RID Master, and Infrastructure Master—along with the DC holding each. For per-role queries using PowerShell, use Get-ADDomain | Select-Object PDCEmulator, RIDMaster, InfrastructureMaster for domain-level roles, and Get-ADForest | Select-Object SchemaMaster, DomainNamingMaster for forest-level roles.
Run dcdiag /test:SysVolCheck to verify SYSVOL replication health and share availability. You can also run net share directly on the DC to confirm that both SYSVOL and NETLOGON appear in the output. If SysVolCheck fails, verify that the DFS Replication (DFSR) service is running on the affected DC, as modern environments use DFS Replication for SYSVOL propagation rather than the older FRS service.
Use the /f parameter to redirect DCDiag output to a text log file: dcdiag /f:<LogFilePath>. For example, dcdiag /e /f:C:\dcdiag-results.txt runs all tests domain-wide and saves the results to the specified file. This is useful for periodic health checks where output needs to be retained for comparison, incident review, or compliance documentation.
ADManager Plus does not execute DCDiag or repadmin diagnostics. It provides AD computer reports, including the Domain Controllers report for DC inventory; supports scheduled report delivery; and enables help desk delegation for reporting tasks. Active diagnostic checks for replication health, DNS validation, and service status must still be performed using DCDiag and repadmin, which require an elevated session on a DC or a machine with RSAT installed.