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

Enumerating Application Directory Partitions in a Forest

· 52CE 我爱测

Like domain partitions, every application directory partition is represented by a crossRef object in the Partitions container of the configuration partition.

Like domain partitions, every application directory partition is represented by a crossRef object in the Partitions container of the configuration partition. Each crossRef object stores data about its corresponding partition.

A crossRef object that represents a domain partition is distinguished from a crossRef object that represents an application directory partition by the contents of the systemFlags attribute. The crossRef object that represents a domain partition will have both the ADS_SYSTEMFLAG_CR_NTDS_NC and ADS_SYSTEMFLAG_CR_NTDS_DOMAIN flags set in the systemFlags attribute. The crossRef object that represents an application directory partition will have the ADS_SYSTEMFLAG_CR_NTDS_NC flag set and the ADS_SYSTEMFLAG_CR_NTDS_DOMAIN flag will not be set in the systemFlags attribute.

The crossRef objects that represent the Schema and Configuration partitions will also have the ADS_SYSTEMFLAG_CR_NTDS_NC flag set and the ADS_SYSTEMFLAG_CR_NTDS_DOMAIN flag will not be set in the systemFlags attribute. This requires that these two crossRef objects be distinguished by the contents of the nCName attribute. The nCName attribute for the crossRef object that represents the Schema container will be identical to the schemaNamingContext attribute of the RootDSE object. Similarly, the nCName attribute for the crossRef object that represents the Configuration container will be identical to the configurationNamingContext attribute of the RootDSE object.

To identify all application directory partitions in a forest, perform the following steps

  1. In the Partitions container of the configuration partition, search for or enumerate all crossRef objects.
  2. If a crossRef object does not have the ADS_SYSTEMFLAG_CR_NTDS_NC flag set or has the ADS_SYSTEMFLAG_CR_NTDS_DOMAIN flag set in the systemFlags attribute value, exclude the object from the result set.
  3. Exclude the Schema partition from the result set by comparing the nCName attribute of the crossRef object to the schemaNamingContext attribute of the RootDSE object.
  4. Exclude the Configuration partition from the result set by comparing the nCName attribute of the crossRef object to the configurationNamingContext attribute of the RootDSE object.
  5. The remaining crossRef objects in the result set all represent 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)

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

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