Replicate AD in Powershell

Replicate AD in Powershell

February 8, 2020

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
}

Leave a Comments

Your email address will not be published. Required fields are marked *

Copyright ©2023 All rights reserved