All system engineers have experienced replication problems once in a lifetime.Today I will show you some basic commands to Troubleshoot and Diagnose Domain Controllers and replications. I'm talking about DCDiag and Repadmin.
DCDiag:
This command-line tool analyzes the status of one or all domain controllers in a forest and reports all problems to provide assistance in troubleshooting. DCDiag.exe consists of a variety of tests that can run either individually or as part of a set to check the state of the domain controller. Here are some examples:
Preparing to install or migrate to Exchange;
Checking FSMO roles;
Troubleshooting Group Policies;
Investigating Active Directory not replicating frssysvol error;
Running down Kerberos authentication problems;
Resetting the Directory Service Administrator's password;
Fixing a servers Service Principle Name (SPN) error.
Repadmin
Performs replication-related tasks, such as managing and modifying replication topology, forcing replication events, and viewing replication metadata and updated vectors.
Let's see some examples and a Script to automize all Domain Controllers replication.