Active Directory replication over WinRM (win_ad_replication)
Reads the inbound replication links of a domain controller over WinRM and reports whether any of them is failing and how long ago the oldest of them last succeeded. A domain controller that has stopped receiving changes still answers logins, so nothing else notices until passwords, group changes or new accounts fail to arrive, which can be days later. One sensor on each controller covers it.
Transport. Under a Windows probe the device can be set to read this sensor over native WMI instead of WinRM; the query and the result are the same. The target is then set up as in the WMI setup guide instead.
What it looks like

The sensor's page after a few polls, watching a Windows Server domain controller reached over WinRM. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
links | Replication links | none | |
failing_links | Failing links | error above 0 | |
consecutive_failures | Failures in a row (worst link) | none | |
last_error | Error code of the first failing link | none | |
last_success_age_s | Time since the oldest last success | s | warning above 4 hours, error above 24 hours |
A link is one naming context received from one partner: a domain with three partners and five naming contexts has up to fifteen. It is failing when its last attempt failed, when it has failed since its last success, or when it has never succeeded. The message names up to five failing links with the partner, the naming context, the count and the Win32 error (failed 7 time(s) in a row, error 8453). The error code is the one repadmin /showrepl prints; 8453 is "replication access was denied", 8457 "the destination server is currently rejecting replication requests" and 1722 "the RPC server is unavailable".
The age is the time since the oldest link last succeeded. It matters on its own because some ways of stopping replication are not failures: with inbound replication disabled (repadmin /options +DISABLE_INBOUND_REPL, which is what a person does before maintenance and forgets) no attempt is made, nothing fails, and the only sign is that the last success gets older. The limits allow for the schedule between sites, which by default replicates every three hours. Within one site changes arrive as they are made, but a link that has nothing to carry is synchronised only on a periodic schedule (hourly by default), so on a quiet domain the oldest success is routinely tens of minutes old (41 minutes on the lab controller in the picture above while nothing was wrong). Do not set the warning limit below two hours.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
partner | every partner | Only the partner with this host name, as repadmin /showrepl shows it (DC2). Case does not matter. |
naming_context | every naming context | Only this naming context, by distinguished name (DC=corp,DC=example). Case does not matter. |
port | 5985, or 5986 with https | TCP port of the WinRM listener. |
https | false | Use the HTTPS listener instead of HTTP with message encryption. |
accept_self_signed | false | Accept an HTTPS certificate that cannot be verified. The credential has the same switch; either one is enough. |
Suggested interval: 300 seconds. Credential: Windows, on the domain controller that is being watched. Discovery proposes one sensor for each replication partner a controller reports (AD replication from DC2), each limited to that partner with every naming context. A controller with no partners is the only one in its domain and gets none. A partner or naming context that is not one of the controller's links fails the sensor with a list of the partners it has.
A link whose source domain controller was deleted is history and is not counted.
Where the data comes from, and why
The sensor reads MSAD_ReplNeighbor in the root\MicrosoftActiveDirectory namespace, one object for each link. It is the table repadmin /showrepl prints, and it was weighed against the two other ways to get the same facts:
| Source | Verdict |
|---|---|
MSAD_ReplNeighbor over WQL | Used. A plain enumeration over the WinRM and WMI clients the other Windows sensors already use, so no new transport and no program to run on the target. It is present on Windows Server 2022 (checked) and, by the class's age, on every controller since Windows Server 2003. |
Get-ADReplicationPartnerMetadata and Get-ADReplicationFailure | Rejected. They answer the same question but need PowerShell remoting, the Active Directory module (a role feature that is not on every controller) and a session on the target. Probeward's WinRM client speaks WS-Management enumeration, not PowerShell remoting. |
repadmin /showrepl /csv | Rejected. It gives the same data as text that has to be parsed, needs a program to run on the target, and its columns and wording have changed between Windows versions. |
Times are the controller's wall clock
The class gives the time of the last success and the last attempt, and the provider writes them as the controller's local time but marks them UTC. On the lab controller, an hour east of UTC, a link that had just succeeded read as an hour in the future, so every age was zero and a link with disabled replication would never have shown as old. The sensor therefore reads the controller's own clock too (Win32_OperatingSystem.LocalDateTime) and subtracts wall clock from wall clock, ignoring both labels. This also makes the age independent of the difference between the controller's clock and the probe's. If the controller does not send its clock the age is unknown and the message says so, rather than guessing.
On the target
WinRM enabled and an account set up as in the WinRM setup guide. Reading the root\MicrosoftActiveDirectory namespace needs Enable Account and Remote Enable on that namespace as well as on root\cimv2 (the setup guide's step for root\CIMV2, repeated for Root\MicrosoftActiveDirectory). The lab checks used a domain administrator; the narrower grant is not tested here.
Failures
The WinRM failures every Windows sensor shares are listed in the setup guide. Specific to this sensor:
| Message | Meaning |
|---|---|
the target does not answer for Active Directory replication, so it is probably not a domain controller (kind config) | The namespace or class does not exist. The sensor was put on a member server or a workstation. |
the domain controller reports no replication partners (kind config) | The only controller of its domain, or replication was removed. |
no replication link matches the sensor's partner and naming context; its partners are ... (kind config) | partner or naming_context names something the controller does not replicate. |
access denied (kind auth_failed) | The account lacks the WMI right on root\MicrosoftActiveDirectory. |
Verification
Checked against WS-Man responses recorded from a real Windows Server 2022 domain controller with one partner (five naming contexts, scrubbed of the domain and host names), and against the two lab domain controllers live over NTLM with message encryption, including a deliberately broken replication: inbound replication was disabled on one controller (repadmin /options +DISABLE_INBOUND_REPL) and a replication was requested from the other. The sensor then showed the failing link with error 8457 within seconds, and the second naming context failing at the next attempt, with the failure count growing; the oldest-success age kept growing for the links that were not attempted. Replication was re-enabled and every link was synchronised again afterwards. The broken states are tested with answers written by hand, and the tests say so. Not seen: more than two controllers, several sites, a link over SMTP or a read-only controller, a controller with a clock in another zone from the probe other than the lab's own, and native WMI over DCOM.
Live tests: PROBEWARD_TEST_WINRM_HOST, _USER and _PASSWORD as for the other Windows sensors, and PROBEWARD_TEST_WINRM_ROLES containing ad. Setting PROBEWARD_TEST_AD_EXPECT to healthy or broken makes the test assert that state, for a run that breaks replication on purpose.