VBScript - Force AD Replication
View Script (right click to download)
I put this script together because we often make changes in AD (mainly for Exchange) that need to be replicated to several DCs overseas and replicated back before they take effect. Forcing the replication to many servers via AD Sites and Services was becoming tedious, and as with most tasks like this it was only a matter of time before I decided that scripting it would be a much better solution.
The script uses the IADsTools COM object to force the replication. The actual COM object is installed as part of the Windows 2000 or Windows Server 2003 support tools resource kit (you can install this from your Windows Server CD under \support\tools\suptools.msi). I have built in some error handling so that if you don’t have the support tools installed it will let you know.
Like most of the scripts I write these days, the script outputs to an Internet Explorer browser window (example below).
You’ll notice when you take a look at the script that I also pause the script for 20 seconds after some of the replications as it can sometimes a while for the actual replication to complete.
Note that I’ve modified the script to remove any company specific information (server names and domain name).
View Script (right click to download)
Ben’s Tech Blog » Blog Archive » New script added to Scripts page - Force AD Replication said,
February 16, 2006 @ 4:49 pm
[…] I created a new script today to force AD replication to a number of servers. I’ve explained how the script works on the script page, check it out if you’re interested. VBScript - Force AD Replication Permalink […]