Force Replication To All Domain Controllers - Risual

Risual is now

Node4 Go to Node4 Continue to risual.com Careers Risual Logo
  • Hello Portal
  • Contact
×

My colleague and I were chatting today and noted that there’s no command to replicate changes to all domain controllers at once, you have to go to each server and force a replicate. So here’s a nifty PowerShell script to grab all the domain controllers and run a replicate sync all command for each one – so a replicate all!

Import-Module ActiveDirectory

$DCs = (Get-ADForest).Domains | %{ Get-ADDomainController -Filter * -Server $_ } | select HostName

foreach ($DC in $DCs)     {         repadmin /syncall $DC.HostName     }

Hope it helps!

SHARE

About the author

Helen Staddon

Experts in transformation

© risual Copyright 2017 - 2021

Terms & Conditions | Privacy Policy

Website by Kanuka Digital

Tag » Active Directory Force Replication Of All Domain Controllers