TestimoX

API Reference

Class

ReplicationService

Namespace ADPlayground.Replication
Assembly ADPlayground
Modifiers static

Collects replication status and builds summaries using DirectoryServices.ActiveDirectory and LDAP (no shell out).

Inheritance

  • Object
  • ReplicationService

Methods

GetAll 2 overloads
public static IReadOnlyList<ReplicationStatus> GetAll(Boolean includeEventLogs = false, Boolean outbound = false) #
Returns: IReadOnlyList<ReplicationStatus>

Returns replication status for all domain controllers in the current forest.

Parameters

includeEventLogs System.Boolean = false optionalposition: 0
outbound System.Boolean = false optionalposition: 1
public static IReadOnlyList<ReplicationStatus> GetAll(ReplicationQueryOptions options) #
Returns: IReadOnlyList<ReplicationStatus>

Returns replication status for all domain controllers in the current forest with options.

Parameters

options ADPlayground.Replication.ReplicationQueryOptions requiredposition: 0
GetForDomain 2 overloads
public static IReadOnlyList<ReplicationStatus> GetForDomain(String domainName, Boolean includeEventLogs = false, Boolean outbound = false) #
Returns: IReadOnlyList<ReplicationStatus>

Returns replication status for all domain controllers in a given domain.

Parameters

domainName System.String requiredposition: 0
includeEventLogs System.Boolean = false optionalposition: 1
outbound System.Boolean = false optionalposition: 2
public static IReadOnlyList<ReplicationStatus> GetForDomain(String domainName, ReplicationQueryOptions options) #
Returns: IReadOnlyList<ReplicationStatus>

Returns replication status for all domain controllers in a given domain using advanced options (credentials, direction, filtering).

Parameters

domainName System.String requiredposition: 0
DNS domain name to query.
options ADPlayground.Replication.ReplicationQueryOptions requiredposition: 1
Replication query options controlling scope, credentials, and direction.

Returns

Replication status rows for the specified domain.

GetForestStats 3 overloads
public static ReplicationForestStats GetForestStats(Boolean bySource, TimeSpan staleThreshold) #
Returns: ReplicationForestStats

Computes forest-wide replication health statistics grouped by destination or source.

Parameters

bySource System.Boolean requiredposition: 0
When true, aggregate by source server; otherwise by destination.
staleThreshold System.TimeSpan requiredposition: 1
Threshold used to classify stale neighbors.
public static ReplicationForestStats GetForestStats(ReplicationQueryOptions options, Boolean bySource, TimeSpan staleThreshold) #
Returns: ReplicationForestStats

Computes replication health statistics for a single domain grouped by destination or source.

Parameters

domainName System.String requiredposition: 0
DNS domain name to filter.
bySource System.Boolean requiredposition: 1
When true, aggregate by source server; otherwise by destination.
staleThreshold System.TimeSpan requiredposition: 2
Threshold used to classify stale neighbors.
GetForestStats(ADPlayground.Replication.ReplicationQueryOptions options, System.Boolean bySource, System.TimeSpan staleThreshold) #

Computes forest-wide replication health statistics using query options.

Parameters

options ADPlayground.Replication.ReplicationQueryOptions required
Query options controlling scope and data source.
bySource System.Boolean required
When true, aggregate by source server; otherwise by destination.
staleThreshold System.TimeSpan required
Threshold used to classify stale neighbors.
GetForestStatsEx 3 overloads
public static ReplicationForestStatsEx GetForestStatsEx(Boolean bySource, Int32[] bucketHours) #
Returns: ReplicationForestStatsEx

Computes histogram-based forest health metrics using custom delta buckets (hours since last success).

Parameters

bySource System.Boolean requiredposition: 0
When true, aggregate by source server; otherwise by destination.
bucketHours System.Int32[] requiredposition: 1
Bucket thresholds in hours (e.g., 1, 3, 6, 12, 24).
public static ReplicationForestStatsEx GetForestStatsEx(ReplicationQueryOptions options, Boolean bySource, Int32[] bucketHours) #
Returns: ReplicationForestStatsEx

Computes histogram-based health metrics for a single domain using custom delta buckets.

Parameters

domainName System.String requiredposition: 0
DNS domain name to filter.
bySource System.Boolean requiredposition: 1
When true, aggregate by source server; otherwise by destination.
bucketHours System.Int32[] requiredposition: 2
Bucket thresholds in hours.
GetForestStatsEx(ADPlayground.Replication.ReplicationQueryOptions options, System.Boolean bySource, System.Int32[] bucketHours) #

Computes histogram-based health metrics using query options and custom delta buckets.

Parameters

options ADPlayground.Replication.ReplicationQueryOptions required
Query options controlling scope and data source.
bySource System.Boolean required
When true, aggregate by source server; otherwise by destination.
bucketHours System.Int32[] required
Bucket thresholds in hours.
public static ReplicationForestStatsEx GetForestStatsExFromRaw(IReadOnlyList<ReplicationStatus> raw, Boolean bySource, Int32[] bucketHours) #
Returns: ReplicationForestStatsEx

Computes histogram-based forest health metrics from pre-fetched raw replication rows.

Parameters

raw System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.ReplicationStatus} requiredposition: 0
bySource System.Boolean requiredposition: 1
bucketHours System.Int32[] requiredposition: 2
public static ReplicationForestStats GetForestStatsFromRaw(IReadOnlyList<ReplicationStatus> raw, Boolean bySource, TimeSpan staleThreshold) #
Returns: ReplicationForestStats

Computes forest-wide replication health statistics from pre-fetched raw replication rows.

Parameters

raw System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.ReplicationStatus} requiredposition: 0
bySource System.Boolean requiredposition: 1
staleThreshold System.TimeSpan requiredposition: 2
GetForestSummary 3 overloads
public static IReadOnlyList<ReplicationForestSummary> GetForestSummary(Boolean bySource = false) #
Returns: IReadOnlyList<ReplicationForestSummary>

Builds a forest view summarizing replication by destination server (or by source when requested).

Parameters

bySource System.Boolean = false optionalposition: 0
When true, groups by source server instead of destination.
public static IReadOnlyList<ReplicationForestSummary> GetForestSummary(ReplicationQueryOptions options, Boolean bySource = false) #
Returns: IReadOnlyList<ReplicationForestSummary>

Builds a forest view summarizing replication using query options (scope, credentials, data source).

Parameters

options ADPlayground.Replication.ReplicationQueryOptions requiredposition: 0
Query options controlling scope and data source.
bySource System.Boolean = false optionalposition: 1
When true, groups by source server instead of destination.
public static IReadOnlyList<ReplicationForestSummary> GetForestSummary(String domainName, Boolean bySource = false) #
Returns: IReadOnlyList<ReplicationForestSummary>

Builds a forest view summarizing replication for a given domain.

Parameters

domainName System.String requiredposition: 0
DNS domain name to filter.
bySource System.Boolean = false optionalposition: 1
When true, groups by source server instead of destination.
public static IReadOnlyList<ReplicationForestSummary> GetForestSummaryFromRaw(IReadOnlyList<ReplicationStatus> raw, Boolean bySource = false) #
Returns: IReadOnlyList<ReplicationForestSummary>

Computes a forest-wide replication summary (repadmin /replsummary-like) from pre-fetched raw replication rows.

Parameters

raw System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.ReplicationStatus} requiredposition: 0
bySource System.Boolean = false optionalposition: 1
GetForServer 2 overloads
public static IReadOnlyList<ReplicationStatus> GetForServer(String serverName, Boolean includeEventLogs = false, Boolean outbound = false) #
Returns: IReadOnlyList<ReplicationStatus>

Returns replication status entries for a specific domain controller (inbound neighbors).

Parameters

serverName System.String requiredposition: 0
includeEventLogs System.Boolean = false optionalposition: 1
outbound System.Boolean = false optionalposition: 2
public static IReadOnlyList<ReplicationStatus> GetForServer(String serverName, ReplicationQueryOptions options) #
Returns: IReadOnlyList<ReplicationStatus>

Returns replication status entries for a specific domain controller using advanced options (credentials, direction, filtering).

Parameters

serverName System.String requiredposition: 0
Target domain controller name (DNS or NetBIOS).
options ADPlayground.Replication.ReplicationQueryOptions requiredposition: 1
Replication query options controlling scope, credentials, and direction.

Returns

Replication status rows for the specified server.

public static ReplicationShowReplReport GetShowReplReport(ReplicationQueryOptions options) #
Returns: ReplicationShowReplReport

Builds a showrepl-style report (per neighbor / naming context rows) using query options.

Parameters

options ADPlayground.Replication.ReplicationQueryOptions requiredposition: 0
Query options controlling scope and data source.
public static IReadOnlyList<ReplicationShowReplRow> GetShowReplRows(ReplicationQueryOptions options) #
Returns: IReadOnlyList<ReplicationShowReplRow>

Returns showrepl-style rows using query options.

Parameters

options ADPlayground.Replication.ReplicationQueryOptions requiredposition: 0
Query options controlling scope and data source.
public static IReadOnlyList<ReplicationShowReplRow> GetShowReplRowsFromRaw(IReadOnlyList<ReplicationStatus> raw) #
Returns: IReadOnlyList<ReplicationShowReplRow>

Converts raw replication rows into showrepl-style rows.

Parameters

raw System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.ReplicationStatus} requiredposition: 0
Raw replication status rows.
GetSummary 10 overloads
public static IReadOnlyList<ReplicationSummary> GetSummary() #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary (neighbors, failed, insecure, last success) for the current forest using a 1-day stale threshold.

public static IReadOnlyList<ReplicationSummary> GetSummary(ReplicationQueryOptions options) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary using custom query options (domain scope, outbound, event logs).

Parameters

options ADPlayground.Replication.ReplicationQueryOptions requiredposition: 0
Query options controlling scope and direction.
public static IReadOnlyList<ReplicationSummary> GetSummary(Boolean outbound) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary for the current forest; optionally shows outbound replicas.

Parameters

outbound System.Boolean requiredposition: 0
When true, summarizes outbound neighbors instead of inbound.
public static IReadOnlyList<ReplicationSummary> GetSummary(String domainName) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary for a given domain using a 1-day stale threshold.

Parameters

domainName System.String requiredposition: 0
DNS domain name.
public static IReadOnlyList<ReplicationSummary> GetSummary(ReplicationQueryOptions options, TimeSpan staleThreshold) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary for a given domain; optionally shows outbound replicas.

Parameters

domainName System.String requiredposition: 0
DNS domain name.
outbound System.Boolean requiredposition: 1
When true, summarizes outbound neighbors instead of inbound.
public static IReadOnlyList<ReplicationSummary> GetSummary(String domainName, TimeSpan staleThreshold) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary for a given domain with a custom stale threshold.

Parameters

domainName System.String requiredposition: 0
DNS domain name.
staleThreshold System.TimeSpan requiredposition: 1
Duration after which a neighbor is considered stale.
public static IReadOnlyList<ReplicationSummary> GetSummary(String domainName, TimeSpan staleThreshold, Boolean outbound) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary for a given domain with a custom stale threshold; optionally summarizes outbound replicas.

Parameters

domainName System.String requiredposition: 0
DNS domain name.
staleThreshold System.TimeSpan requiredposition: 1
Duration after which a neighbor is considered stale.
outbound System.Boolean requiredposition: 2
When true, summarizes outbound neighbors instead of inbound.
public static IReadOnlyList<ReplicationSummary> GetSummary(TimeSpan staleThreshold) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary across the forest with a custom stale threshold.

Parameters

staleThreshold System.TimeSpan requiredposition: 0
Duration after which a neighbor is considered stale.
public static IReadOnlyList<ReplicationSummary> GetSummary(TimeSpan staleThreshold, Boolean outbound) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary across the forest with a custom stale threshold; optionally summarizes outbound replicas.

Parameters

staleThreshold System.TimeSpan requiredposition: 0
Duration after which a neighbor is considered stale.
outbound System.Boolean requiredposition: 1
When true, summarizes outbound neighbors instead of inbound.
GetSummary(ADPlayground.Replication.ReplicationQueryOptions options, System.TimeSpan staleThreshold) #

Computes a per-DC summary using query options and custom stale threshold.

Parameters

options ADPlayground.Replication.ReplicationQueryOptions required
staleThreshold System.TimeSpan required
public static IReadOnlyList<ReplicationSummary> GetSummaryFromRaw(IReadOnlyList<ReplicationStatus> raw, TimeSpan staleThreshold) #
Returns: IReadOnlyList<ReplicationSummary>

Computes a per-DC summary from already collected raw status rows. Useful for callers that need to avoid double enumeration (e.g., monitoring).

Parameters

raw System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.ReplicationStatus} requiredposition: 0
Raw replication status rows.
staleThreshold System.TimeSpan requiredposition: 1
Stale threshold for summaries.
public static ReplicationTopologyReport GetTopologyReport(ReplicationQueryOptions options, TimeSpan staleThreshold) #
Returns: ReplicationTopologyReport

Builds a typed replication topology report for the provided query options.

Parameters

options ADPlayground.Replication.ReplicationQueryOptions requiredposition: 0
Query options controlling scope and direction.
staleThreshold System.TimeSpan requiredposition: 1
Threshold used to classify stale edges.
public static ReplicationTopologyReport GetTopologyReportFromRaw(IReadOnlyList<ReplicationStatus> raw, TimeSpan staleThreshold) #
Returns: ReplicationTopologyReport

Builds a typed replication topology report from raw status rows.

Parameters

raw System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.ReplicationStatus} requiredposition: 0
Raw replication status rows.
staleThreshold System.TimeSpan requiredposition: 1
Threshold used to classify stale edges.

Properties

public static IReplicationEventLogAnalyzer EventLogAnalyzer { get; set; } #

Optional event-log analyzer used to compute ConsecutiveFailures when requested. Defaults to a no-op provider to avoid any event log dependencies unless opted-in. TODO(EventLogs): Wire this to the repository's event log library implementation.