Monitoring Replication

The WMI Replication provider is another good example of how Microsoft is leveraging WMI to help with monitoring Active Directory. Like the Trustmon provider, the Replication provider is only available with Windows Server 2003 and is contained under the root\MicrosoftActiveDirectory namespace. It provides classes to list the replication partners for a domain controller, view the supported Naming Contexts for a domain controller, and also see the pending replication operations.

Table 29-8 contains some of the more useful properties for the MSAD_ReplNeighbor class, which represents a replication partner (or neighbor) for a given domain controller.

Table 29-8. Useful MSAD_ReplNeighbor properties

Property

Description

IsDeletedSourceDsa

Boolean indicating whether the source DC has been deleted.

LastSyncResult

Number representing the result of the last sync operation with this neighbor. A value of 0 indicates success.

NamingContextDN

DN of the Naming Context for which the partners replicate.

NumConsecutiveSyncFailures

Number of consecutive sync failures between the two neighbors.

SourceDsaCN

CN of the replication neighbor.

SourceDsaSite

Site the replication neighbor is in.

TimeOfLastSyncAttempt

Time of the last sync attempt.

TimeOfLastSyncSuccess

Time of last successful sync attempt.

There are actually several property methods available other than what is shown in Table 29-8, so in the following example, we will enumerate ...

Get Active Directory, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.