Here is the example command to replicate all AD in powershell command:
function Replicate-AllDomainController {
(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
}
Chisqi
My name is Chisqi lives in Surabaya, Indonesia. I have been in the IT pro for more ten years, working positions as a Windows System Administrator and Server/Infrastructure Support including design and implementation on-premise, private, public and Hybrid cloud solution. Certified MCSE Windows Server 2016 and have a strong passion for Microsoft products and technologies in both the enterprise and consumer spaces.