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} |