Handy Tips when troubleshooting Active Directory Replication Issues

, ,

Over the years I’ve come across a number of different environments with many running Active Directory in many different states. Replication is an important part of ensuring that your AD environment is healthy and highly available to service end users. I’ve compiled some notes around Active Directory Replication commands and gathering information.

Firstly, just give the server a quick look over, make sure it has plenty of hard disk space wherever the Active Directory NTDS database lives and a quick look in the event viewer for anything out of the ordinary, this usually reveals the issue and you can start to troubleshoot and fix. Otherwise we can use some of the tools below to dig deeper into the AD environment.

repadmin

A quick way I check to ensure replication is going okay is to use the replsummary command, this will give me an output of each replication relationship for each domain controller as well as the delta size, last change time and any errors.

repadmin /replsummary

You can also pipe the replication relationships and summary to a csv, which is a good way to dig into the environment and getting an understanding of how everything fits together.

repadmin /showrepl * /csv > rep.csv

In order to force Active Directory replication, we can issue the command repadmin /syncall /AeD on the domain controller which we want to update the Active Directory Database for, for example DC02 is out of Sync we run the command on DC2.

  • A = All Partitions
  • e = Enterprise (Cross Site)
  • D = Identify servers by distinguished name in messages.
repadmin /replicate DC01-PRD.stg.local DC02-PRD.stg.local DC=Prod,DC=stg,DC=local /selsecrets

By default this does a pull replication – which is how AD works by default.  If you want to do a push replication use the following command:

repadmin /syncall /APeD

You want to do a push replication if you make changes on a DC and you want to replicate those changes to all other DC’s.  For example, you make a change on DC1 and you want all other changes to get that change instantly, run repadmin /syncall /APeD on DC1.

For all repadmin syntax please see this link on Microsoft

dcdiag

dcdiag is another simple tool you can use to quickly run a number of tests across your active directory, I generally run this as part of an audit and pipe the output to a text file for review later.

dcdiag > dcdiag.txt

This will test things like DNS, Group Policy, AD DS Services, Replication and reachability of services across the Active Directory environment and is a quick way to get a quick snapshot of overall health.

nltest

nltest is another tool you can use to analyse the local machine and connectivity to active directory. Most of these commands will require a domain, in this case stg.local but change that with your own AD namespace. We can do a secure channel test to ensure a client has connectivity to a domain controller (and what domain controller)

nltest /sc_query:stg.local

We can also identify domain controllers via DNS

nltest /dnsgetdc

And we can also reset the secure channel if the machine complains about the trust relationship between this workstation and the primary domain has failed, hint there is also a cool powershell command for this

nltest /sc_reset:stg.local

All of these tools are quite powerful, but knowing just a few of these commands will get you a long way in understanding what the issue is or could be.


Leave a Reply

More Posts

Configuring SharePoint 2007 to accept blocked file types

One of my clients using SharePoint 2007 were uploading some files to their site recently and got the following error: The following file(s) have been blocked by the administrator By going through Central Administration, I was able to unblock the file and allow them to upload the particular file to the library they were wanting […]

Installing the PowerShell ISE (Integrated Scripting Environment) on Windows Server 2008 R2

I was recently looking at modifying our SharePoint warm-up script as we had found out that it wasn’t working as it should be.  So I went to fire up the small but useful PowerShell ISE and found that it wasn’t available.  So there are two ways to go about getting it installed. First off is […]

Power BI Gateway SSL Issues with managed AWS RDS SQL Server instances

I had a customer call up and explain their Power BI reports had stopped working, they’re not managed so after working a few things out we got to work and jumped into their Datawarehouse environment in AWS. After a quick look we could see that their RDS SQL Server instance had TLS turned on and […]