PowerShell Genie

Check AD replication failures

Script 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn

Find replication partners reporting consecutive failures, keep the source and partner together, and verify the pair before drawing a domain-wide conclusion.

Example reviewed 1 October 2026 · Illustrative output · Not a live system check

The script

Get-ADReplicationPartnerMetadata -Target * -Scope Domain -ErrorAction Stop |
    Where-Object ConsecutiveReplicationFailures -gt 0 |
    Select-Object Server, Partner, ConsecutiveReplicationFailures, LastReplicationSuccess

Script reader

Inspect before you run

Inspection only

Inspect the script below. It does not run in this browser.

Inspection only — no command has run.

    Show reference output

    Fictional reference snapshot · 03 October 2026, 09:00 UTC. This is an example result, not a check of your systems.

    Server  Partner                         ConsecutiveReplicationFailures  LastReplicationSuccess
    ------  -------                         ------------------------------  ----------------------
    DC02    CN=NTDS Settings,CN=DC01,...     3                               02/10/2026 07:30:00
    Inspect this example’s structure

    Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.

    Get-ADReplicationPartnerMetadata -Target * -Scope Domain -ErrorAction Stop | Where-Object ConsecutiveReplicationFailures -gt 0 | Select-Object Server, Partner, ConsecutiveReplicationFailures, LastReplicationSuccess
    1. Stage 1Get-ADReplicationPartnerMetadata-Target -Scope -ErrorAction
    2. Stage 2Where-Object-gt
    3. Stage 3Select-ObjectPositional values or no named parameters

      Illustrative output

      This example shows the expected shape for fictional data. Your values and formatting will differ.

      Server  Partner  ConsecutiveReplicationFailures  LastReplicationSuccess
      DC01    DC02     3                               2026-09-30 08:15:00

      How it works

      The query collects partner metadata in the current domain scope. The filter keeps positive failure counts, so a row with zero failures cannot appear in this output. Each record is partner evidence at the observation time; it is not an overall health certificate.

      Before you run it

      Use the ActiveDirectory module, suitable directory read permissions and connectivity to the domain controllers. PowerShell 7 support depends on the installed RSAT/module version and Windows environment. A query error must not be treated as an empty success.

      Check the result

      Recheck the same source, partner and naming context after investigation. Compare with Get-ADReplicationFailure and replication diagnostics. Record timestamps; a previous failure may have cleared by the next observation.

      If nothing is returned

      If the query completed successfully, no returned partners matched the positive-count filter. This does not prove every naming context and controller was inspected. Confirm the scope and check errors before closing an incident.

      Practise the underlying skill

      Try a related exercise →

      Read the primary Microsoft documentation

      Genie guideCheck AD replication failures

      Find replication partners reporting consecutive failures, keep the source and partner together, and verify the pair before drawing a domain-wide conclusion.