Trigger an Active Directory replication with PowerShell


Many of us already use “RepAdmin /SyncAll” to force an Active Directory replication.You can emulate that with those PowerShell lines :

[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainControllers | % {

The ‘CrossSite’ parameter is a “System.DirectoryServices.ActiveDirectory.SyncFromAllServersOptions“, you can see the possible options with :


The first parameter of the “SyncReplicaFromAllServers” method, is the distinguished name of the naming context you want to trigger replication.

Leave a Reply