大网数据广告活动
域与目录服务

Enumerating Replicas of an Application Directory Partition

· 52CE 我爱测

This topic shows how to enumerate the replicas for an application directory partition.

When a replica of an application directory partition is added, the distinguished name of the nTDSDSA object for the domain controller that will contain the replica is added to the msDS-NC-Replica-Locations attribute of the crossRef object. The crossRef object used represents the application directory partition.

To enumerate the replicas for an application directory partition

  1. Search the Partitions container for a crossRef object that has an nCName attribute value that is equal to the distinguished name of the application directory partition.
  2. Use each value of the msDS-NC-Replica-Locations attribute of the crossRef object to bind to the nTDSDSA object of the server.
  3. Obtain the ADsPath for the parent of each nTDSDSA object. This is an object that represents the domain controller server. Use the ADsPath to bind to the server object.
  4. Obtain the dNSHostName attribute value of the server object. This is a single-value property that contains the DNS name of the server.

Due to replication latency and scheduled KCC run delays, it is possible the actual active replicas for an application directory partition may not match the list of domain controllers indicated by the msDS-NC-Replica-Locations attribute of the crossRef object. A more accurate, but less efficient way to determine the actual active replicas of an application directory partition is to search for all nTDSDSA objects in the forest that have a msDS-hasMasterNCs attribute that contains the distinguished name of the application directory partition. The msDS-hasMasterNCs attribute contains the distinguished names of all writable directory partitions that the domain controller hosts, including application directory partitions.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。