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.

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

Comments are closed.