Test Replication failures

Get-ADComputer -SearchBase “ou=domain controllers,dc=freiburg,dc=home” -filter * | foreach { Get-ADDomainController -Identity $_.DNSHostname} | ForEach-Object {if (Test-Connection -ComputerName $psitem.name -Quiet -Count 1) { Get-ADReplicationFailure -target <servername>} else { Write-Warning -Message “cannot contact $($psitem.name)” }}

Leave a Reply

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