Force Active Directory Replication

Force replication via Powershell.

This Cmdlets force the replication of the User Account on all the partitions as shown below.

To Sync All the DC partitions, like Domain, Global Catalog, Schema, DNS, and for all its replication partners even when these are in another site, Run the below Command

Repadmin /syncall <DC> /A /e

Again, the above command forces the sync on the current DC and syncs its value with other replication partners. If you want to do this on all the available DCs, Run the below PowerShell Cmdlet

[System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites | Sort-Object -Property @{Expression={$_.Servers.Count}} -Descending | ForEach-Object { $_.Servers } | Foreach-Object { repadmin /syncall $ /A /e }

If you just want to list all the available DCs on the forest, Run the below Cmdlet :

[System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites | Sort-Object -Property @{Expression={$_.Servers.Count}} -Descending | Select Servers

To see the Replication summary, Run this command :

Repadmin /replsum
Repadmin /syncall <DC> /A /e
Get-ADDomainController -filter * | foreach {Sync-ADObject -Object "CN=Alaura Gate, OU=Contoso Users,OU=Contoso,DC=Contoso,DC=com 
" -source “DC.Contoso.Com” -Destination $_.hostname}

Initiating Replication Using the Sites and Services Manager Snapin :

1. Click Start | Programs | Administrative Tools and then click Active Directory Sites and Services

2. Expand the Sites container in the left pane. Expand the container that represents the name of the site containing the target server that needs to be synchronized with its replication partners.

3. Expand the Servers container, and then expand the target server to display the NTDS Settings object

4. Click the NTDS Settings object. The connection objects in the right pane represent the target server’s direct replication partners.

5. Right-click a connection object in the right pane, and then click Replicate Now

Get-ADDomainController -filter * | foreach {Sync-ADObject -Object "CN=Alaura Gate, OU=Contoso Users,OU=Contoso,DC=Contoso,DC=com" -source “DC.Contoso.Com” -Destination $_.hostname}

Leave a Reply

Your email address will not be published. Required fields are marked *