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.

Copyright ©2022 All rights reserved | This template is made with by Colorlib