windows_serverwindows server

Repadmin is the ultimate replication diagnostic tool.

It can be used to force replication and pinpoint errors.

Active Directory replication is a critical service that keeps changes synchronized with other domain controllers in the forest.

Problems with replication can cause authentication failures and issues accessing network resources (files, printers, applications).

How to install Repadmin

Repadmin was introduced in 2003 with the Windows Server 2003 support tools.

Microsoft started to include the repadmin command in Windows server 2008 and up.

Repadmin Examples

To use repadmin you need to run the command prompt as an administrator. Simply right click cmd and choose to run as administrator

1: Display the repadmin help menu

Use the following command to see the help menu, this will display all the command line options. There are many options and you will probably not use most of them.

repadmin /?

2: Summarize the replication status and view the overall health

The first command you should use is replsummary. This command will quickly show you the overall replication health. This command will show you the percentage of replication attempts that have failed as well as the largest replication deltas.

repadmin /replsummary

3:  Show replication partner and status

Next, use the following command to see the replication partner as well as the replication status. This helps you understand the role of each domain controller in the replication process.

In addition, this command displays the GUID of each object that was replicated and its result. This is helpful to identify what objects are failing to replicate.

repadmin /showrepl

4: Show replication partner for a specific domain controller

If you want to see the replication status for a specific domain controller use this command.

replace <ServerName> with the name of your domain controller.

repadmin /showrepl <ServerName>

5: Show replication Queue

It is normal to see items in the queue. If you have a small environment it will often be at zero because there are few replications that occur. If you notice items sitting in the queue and they never clear out, you have a problem.

Use this command to view the replication queue

Repadmin /Queue

6: How to Force Active Directory Replication

Use the following command if you want to force replication between domain controllers. You will want to run this on the DC that you wish to update. For example, if DC1 is out of sync I would run this on DC1.

This will do a pull replication, which means it will pull updates from DC2 to DC1.

repadmin /syncall dc1 /Aed

If you want to push replication you will use the /P switch. For example if you make changes on DC1 and want to replicate those to other DCs use this command.

repadmin /syncall dc1 /APed

7: Export results to text file

Sometimes these commands can display a lot of information. You can export any of the examples above to a text file, this makes it a little easier to review at a later time or save for documentation.

just add > c:\destination folder\filename.txt to the end of any of the commands

Here are a few examples

repadmin /replsummary > c:\folder\replsummary.txt

repadmin /showrepl > c:\folder\showrepl.txt

8: Find the last time your DC was backed up

Repadmin /showbackup *

9: Display calls that have not yet been answered

repadmin /showoutcalls *

10: List the Topology information

repadmin /bridgeheads * /verbose

11: Inter Site Topology Generator Report

repadmin /istg * /verbose