Force replication on all domain controller of a domain

The following line searches for all Domain Controllers of a Domain . Then it filters some Computers by IP (10.10.10.*) to eliminate RODCs and finally forces replication on each remaining Domain Controller.

$Domain = "Contoso.com"  
Get-ADDomainController -Filter * -server $Domain | where {$_.IPv4Address -notlike "10.10.10.*"} | foreach { repadmin /syncall /A /e /q $_.hostname}
This entry was posted in Information Technology and tagged , , . Bookmark the permalink.

Comments are closed.