Script: Force Domain Controller Replication
Made a change to Active Directory that you need replicating right now! Use this script.
💡
For this script to successfully work, you will need to ensure you have RSAT (Remote Server Administration Tools) installed on the machine you are running this script from. Alternatively, run this directly on a domain controller. You will also need to run this script with an account that has Domain Admin privileges.
(Get-ADDomainController -Filter *).Name | Foreach-Object {repadmin /syncall $_ (Get-ADDomain).DistinguishedName /e /A | Out-Null}; Start-Sleep 10; Get-ADReplicationPartnerMetadata -Target "$env:userdnsdomain" -Scope Domain | Select-Object Server, LastReplicationSuccess
pause
Feel free to copy and paste the above script.