I'd like to request an Active Directory Replication monitor

asked 02 Mar '15, 17:11

ashmite's gravatar image

ashmite
5325
accept rate: 100%


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
}
link

answered 04 Mar '15, 13:36

ashmite's gravatar image

ashmite
5325
accept rate: 100%

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

link

answered 02 Mar '15, 21:35

MTE's gravatar image

MTE
142920
accept rate: 13%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×72
×2

Asked: 02 Mar '15, 17:11

Seen: 3,242 times

Last updated: 04 Mar '15, 13:36