PowerShell script to force AD Replication

Subscribe to my newsletter and never miss my upcoming articles

$DomainControllers \= Get-ADDomainController \-Filter \*

ForEach ($DC in $DomainControllers.Name) {

Write-Host "Processing for "$DC \-ForegroundColor Green

If ($Mode \-eq "ExtraSuper") {

REPADMIN /kcc $DC

REPADMIN /syncall /A /e /q $DC

}

Else {

REPADMIN /syncall $DC "dc=DOMAIN,dc=TLD" /d /e /q

}

}

Force replicate all your domain controllers. Be sure to change the DOMAIN and TLD in line 11.

No Comments Yet