My company has more than 80 sites, and my predecessor for reasons unknown to me put in a large chunk of time preventing replication between the HQ's DC and the branches' RODC.

I need to reset their settings to allow replication throughout the day, with reduction of frequency during daytime and full frequency during nighttime.

Is there a way to do these changes in bulk? I totally am not looking forward to replacing them one-by-one...

PS: What I'm referring to is the replication settings in these 2 places:

  • "Site Links" under "Sites\Inter-site Transports\IP"
  • "RODC Connection" under "Sites\(SiteName)\Servers\(ServerName)\NTDS Settings"
  • 6
    Would you consider using Powershell? blogs.technet.com/b/ashleymcglone/archive/2011/06/29/… – jscott Jul 11 '12 at 13:41
  • @jscott That would be my answer! I was also checking this out... not sure it can change replication settings though: blogs.technet.com/b/heyscriptingguy/archive/2011/07/19/…. At the very least it allows you to easily test the replication as well – Brent Pabst Jul 11 '12 at 13:47
  • Sorry, I haven't been able script-up a test for this... Hence, the comment instead of answer... Also link-only answers are poor form. Hopefully one of the other AD/PS guys around here will pop in and put up something reasonably detailed. – jscott Jul 11 '12 at 13:55
  • The powershell method look more intuitive. There is also an "expert mode" for REPADMIN.EXE. See usage with "repadmin /experthelp" or check here technet.microsoft.com/en-us/library/cc811549%28WS.10%29.aspx – Clayton Jul 11 '12 at 15:07
  • @jscott No worries, I'm quite familiar with PowerShell... after all, I tend to do my daily AD Admin stuff using ActiveRoles... I'll gonna check your link tomorrow when I'm back at the office. Thanks! – pepoluan Jul 11 '12 at 18:33

The Schedule attribute is a BLOB, so setting that from PowerShell is probably going to be a bit of pain. I suspect that you can set one of your site links manually with the GUI and then use the value stored in "Schedule" to replace the "Schedule" value on other site links.

I haven't tested this code, but I suspect this will work to reset the replication interval to the default (15 minutes) and the replication schedule (provided you get the appropriate value to specify in the "Schedule" attribute).

Get-ADObject -Filter 'objectClass -eq "siteLink"' -SearchBase (Get-ADRootDSE).ConfigurationNamingContext | Set-ADObject -Replace @{ReplInterval=15;Schedule=your_schedule_value}

The Connection object in each server in each site has a "Schedule" attribute, too. I'd recommend clearing these attributes (returning them to 24 x 7 schedules, effectively) and setting your replication schedules on the "siteLink" objects. This will allow you add another server to the site w/o requiring you to set the schedule on that individual server. The siteLink object's schedule will "trump" the schedule specified on an individual server's "Connection" object.

You could clear these schedules back to default by running:

Get-ADObject -Filter 'objectClass -eq "nTDSConnection"' -SearchBase (Get-ADRootDSE).ConfigurationNamingContext | Set-ADObject -Clear Schedule
  • Sorry for the delay... just got the chance to test your suggestion today... the first one worked. Trying the second one... – pepoluan Jul 13 '12 at 13:40
  • Unfortunately, the second one does not work; Get-ADObject -Filter 'objectClass -eq "connection"' -SearchBase (Get-ADRootDSE).ConfigurationNamingContext does not return anything... – pepoluan Jul 13 '12 at 13:49
  • Ah! It should be 'objectClass -eq "nTDSConnection"' instead of 'objectClass -eq "connection"' ... but I got 2 connections whose Name properties are composed exclusively of GUID, instead of the readable Connection Name... I'll explore further. – pepoluan Jul 13 '12 at 13:52
  • Ahhh, finally everything has been reset! Thank you! I'll mark your answer as the answer :) – pepoluan Jul 13 '12 at 14:27
  • Glad I could help you out. – Evan Anderson Jul 13 '12 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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