Active Directory Cookbook (2024)

Solution

Using a graphical user interface

  1. Open the Active Directory Sites and Services snap-in.

  2. Browse to the NTDS Settingobject for the domain controller you want to replicate to.

  3. In the right pane, right-click on the connection object to the domaincontroller you want to replicate from and select Replicate Now.

Using a command-line interface

The following command will perform a replication sync ofthe naming context specified by<NamingContextDN> from<DC2Name> to<DC1Name>:

> repadmin /replicate <DC1Name> <DC2Name> <NamingContextDN>

The Windows 2000 version of repadmin has adifferent syntax to accomplish the same thing. Here is the equivalentsyntax:

> repadmin /sync <NamingContextDN> <DC1Name> <DC2GUID>

Using VBScript

' This code initiates a replication event between two DCs' for a naming context' ------ SCRIPT CONFIGURATION ------strDC1Name = "<DC1Name>" ' e.g. dc1 strDC2Name = "<DC2Name>" ' e.g. dc2strNamingContextDN = "<NamingContextDN>" ' e.g. dc=rallencorp,dc=com' ------ END CONFIGURATION ---------set objIadsTools = CreateObject("IADsTools.DCFunctions")intRes = objIadsTools.ReplicaSync(Cstr(strDC1Name),_ Cstr(strNamingContextDN),_ Cstr(strDC2Name), 0, 0)if intRes = -1 then Wscript.Echo "Error: " & objIadsTools.LastErrorTextelse WScript.Echo "Replication intitiated from " & strDC2Name & _ " to " & strDC1Nameend if

Discussion

Each solution shows how ...

Get Active Directory Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.

Active Directory Cookbook (2024)
Top Articles
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 5692

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.