WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Hints on forcing directory replication

There are a lot of issues involved with AD replications. Rather than open the proverbial can of worms, however, lets assume that you have correctly diagnosed the problem and that you want to force replication via a WinBatch script. If these assumptions are correct, the solution may be relatively simple.

First, dig through that pile of old CDs and find your Windows 2000 installation CD. Insert it into the Win2k machine you want to run your replication script on. Go to the SUPPORT\TOOLS directory and click on SETUP.EXE. This will install a bunch of handy support tools for Win2k.

Next create a WB script that looks something like this:

; Load the ADs tools dll as a com object.
AdsTools = ObjectOpen("IADsTools.DCFunctions")

; Replicate a partition.
nResult = AdsTools.ReplicaSync("ToServer","dc=mysubdomain,dc=mydomain,dc=com", "FromServer")

; Note: returns zero on success.
If nResult == 0
   Message("IADsTools Replication", "Completed successfully.")
Else
   Message("IADsTools Replication", "Failed.")
EndIf 

Of course you need to substitute values for your site and it might be a good idea to read the documentation provided with the support tools. The "ReplicaSync" member has several optional parameters that may be important to you.


Article ID:   W15798
File Created: 2006:03:17:11:05:48
Last Updated: 2006:03:17:11:05:48