Testing AD replication

I thought that using a workflow with its foreach –parallel construct would be a good way to test AD replication. I found that I got double the results – the foreach seemed to go to each machine twice.

Eventually decided to perform the task sequentially

Get-ADDomainController -Filter * |
foreach {
  Get-ADReplicationUpToDatenessVectorTable -Target $($psitem.Hostname) -Partition * |
  select Server, LastReplicationSuccess, Partition,
  @{N=’Partner’; E={(($_.Partner -split “,”)[1]).Remove(0,3)}}, USnFilter
} | ft –a

There a re a number of cmdlets for working with AD replication that are worth investigating

This entry was posted in PowerShell and Active Directory. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s