PowerShell for Windows Admins

Feb 16 2015   12:23PM GMT

Testing AD replication

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Tags:
Active Directory
Powershell

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

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: