Categories

S.DS.AD – Replication

We can us e what we have learnt about domain controllers to enables to have a way to examine the replication between domain controllers.

$type = [System.DirectoryServices.ActiveDirectory.DirectoryContextType]::Domain
$context = New-Object -TypeName System.DirectoryServices.ActiveDirectory.DirectoryContext -ArgumentList $type, "manticore.org"
$dcs = [System.DirectoryServices.ActiveDirectory.DomainController]::FindAll($context)
foreach ($dc in $dcs){
    $dc.Name
    $dc.GetAllReplicationNeighbors() | Format-List PartitionName, SourceServer, LastAttemptedSync, LastSyncMessage
}

We derive our list of domain controllers as previously.  This time though we iterate through the list of domain controllers. Foreach domain controller we get the replication partners and then we display the partitions that are being replicated, the source server, the last time synchronisation was attempted and the message. If the message reads anything but “The operation completed successfully.” then you need to investigate.

 

Technorati Tags: ,

Leave a Reply