Feature Request: Active Directory Replication Monitor

Viewed 0

I'd like to request an Active Directory Replication monitor

2 Answers

RepAdmin.exe is the recommended way to monitor the health of AD replication. In fact, TechNet tells you to use RepAdmin after finding errors in the Event log, so might as well go straight to RepAdmin.

I broke down and started learning the PowerShell object model, came up with the following script to run RepAdmin against the monitored DC. It formats the RepAdmin results in CSV, and converts them into a native PowerShell object. From there it produces a sorted list of replication partner DCs that the monitored DC is having difficulty replicating from.

$Mon.FireActions = $False
$Mon.Details = ""

$Name = $Mon.ComputerName

$Replication = Repadmin /ShowRepl $Name /CSV | ConvertFrom-CSV | Where {$_.'Number of Failures' -gt  0 } | Select -Unique 'Source DSA' | Sort 'Source DSA'

If ($Replication)
{
  $String  = ""
  $String += "The Domain Contoller $($Name.ToUpper()) is having difficuly replicating The following servers:`n`n"
  $String += "    Server`n"
  $String += "   --------`n"

  ForEach ($ReplError in ($Replication ))
  {
    $Source = $ReplError.'Source DSA'
    $String += "    " + $Source + "`n"
  }
  $Mon.FireActions = $True
  $Mon.Details = $String
}
Else
{
  $Mon.FireActions = $False
  $Mon.Details = "Replication is now functioning for Domain Controller " + $Name
}

What´s your special need? You will find most informations if you monitor the eventlog with filters. Best regard MTE

Related