Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With Active Directory, what is a good way to monitor replication?

I have multiple sites and multiple locations, so ideally both replication between sites and within sites would be monitored. I'm not really sure if each DC needs to be monitored, each NTDS connection, or each DC * Each NTDS connection.

For the purposes of fitting into a standard alerting methodology, perfmon counters that would allow me to alert if replication was behind X minutes seems like it might be ideal.

share|improve this question
Related:… – Zoredache Nov 22 '11 at 17:40

Looking through the Directory Services Perfmon counters I don't see anything that seems to be exactly what I want.

I happen to use a monitoring system that supports powershell (Orion), so I wrote this up really quick and am going to see how it works for my needs:

#PS Script to Monitor Seconds since Last Successful AD Sync (By taking the longest (max) of any partition 
#KMB 11/22/2011 

import-module -name RepPSAdmin

$hostname = $env:COMPUTERNAME

#PS C:\Windows\system32> Get-ADServerReplicationStatus -ServerName $hostname -SourceServer | Get-Member -memberType *property

$now = Get-Date
$latest = New-Timespan -start $now -end $now
Get-ADServerReplicationStatus -ServerName $hostname -SourceServer | foreach-object { 
    #Write-Host $_.LastSuccessfulSync}
    $temp = $now - $_.LastSuccessfulSync
    #Write-Host $_.LastSuccessfulSync :: $temp :: $temp.TotalSeconds
    if ($temp.TotalSeconds -gt $latest.TotalSeconds) {
        $latest = $temp
Write-Host $latest.TotalSeconds

Disclaimer -- this script is still a work and progress and I don't really know powershell :-P

share|improve this answer
You could run repadmin and dcdiag daily and parse/record the results? – mfinni Nov 22 '11 at 17:08
Off the top of my head/bookmarks. You could check repadmin /replsummary and IIRC one DC per site if you have a forest should be more than ok, otherwise there is a very long document on replication topologies – user Nov 22 '11 at 17:41
Where you're going should work fine, though you'll need to consider that inter-site and intra-site replication connections have different minimum replication intervals (5 minutes and 15 minutes, respectively). – Evan Anderson Nov 22 '11 at 18:43

Could you set aside a monitoring namespace in ad ? Then you could periodically write some timestamps to the primary and poll the replicates to see how long it takes for the latest to be replicated.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.