API Reference
TopologyService
Enumerates Sites/Subnets/Links from the forest configuration NC (no shell out). All methods are read-only and require only standard directory read access.
Inheritance
- Object
- TopologyService
Methods
public static IReadOnlyList<SiteInfoEx> AttachSiteOptions(IReadOnlyList<SiteInfoEx> sites, String domainName = null) #IReadOnlyList<SiteInfoEx>Attaches site options flags from the configuration partition to provided sites.
Parameters
- sites System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.SiteInfoEx}
- Sites to enrich.
- domainName System.String = null
- Optional domain used to resolve configuration partition in multi-forest scenarios.
Returns
Enriched site list with Options populated.
public static IReadOnlyList<SiteInfoEx> AttachSubnets(IReadOnlyList<SiteInfoEx> sites, IReadOnlyList<SubnetInfoEx> subnets) #IReadOnlyList<SiteInfoEx>Attaches subnet CIDRs to site entries based on their site binding.
Parameters
- sites System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.SiteInfoEx}
- Sites to enrich.
- subnets System.Collections.Generic.IReadOnlyList{ADPlayground.Replication.SubnetInfoEx}
- Subnets with site bindings.
Returns
Enriched site list with Subnets populated.
public static IReadOnlyList<SiteLinkInfoEx> GetSiteLinks(String forestName = null) #IReadOnlyList<SiteLinkInfoEx>Returns site links including cost, options, and schedule summary (hours allowed).
Parameters
- forestName System.String = null
public static IReadOnlyList<SiteLinkInfoEx> GetSiteLinks(String forestName, Boolean hasScheduleOnly, SiteLinkOptionFlags[] requiredOptions) #IReadOnlyList<SiteLinkInfoEx>Returns site links filtered by schedule presence and required option flags.
Parameters
- forestName System.String
- Optional forest DNS name.
- hasScheduleOnly System.Boolean
- When true, returns only links with schedules.
- requiredOptions ADPlayground.Replication.SiteLinkOptionFlags[]
- When provided, returns only links that have all these flags set.
public static SiteLinksSummary GetSiteLinksSummary(String forestName = null) #SiteLinksSummaryReturns aggregate site link counts and cost statistics.
Parameters
- forestName System.String = null
public static IReadOnlyList<SiteInfoEx> GetSites(String forestName = null) #IReadOnlyList<SiteInfoEx>Returns sites (CN=Sites) with basic data and DC list per site.
Parameters
- forestName System.String = null
public static IReadOnlyList<SiteInfoEx> GetSites(String forestName, Boolean includeSubnets, Boolean includeOptions, Boolean onlySitesWithoutDc) #IReadOnlyList<SiteInfoEx>Returns sites with optional enrichment and filtering.
Parameters
- forestName System.String
- Optional forest DNS name.
- includeSubnets System.Boolean
- When true, attaches subnet CIDRs to each site.
- includeOptions System.Boolean
- When true, attaches NTDS Site Settings options.
- onlySitesWithoutDc System.Boolean
- When true, returns only sites with zero domain controllers.
public static IReadOnlyList<SubnetInfoEx> GetSubnets(String forestName = null) #IReadOnlyList<SubnetInfoEx>Returns subnets and their site bindings.
Parameters
- forestName System.String = null
public static SubnetSummary GetSubnetSummary(String forestName = null) #SubnetSummaryReturns aggregated subnet totals and per-site counts with orphan count.
Parameters
- forestName System.String = null