17.2. Finding the Application Partitions in a Forest

Problem

You want to find the application partitions that have been created in a forest.

Solution

Using a graphical user interface

  1. Open LDP.

  2. From the menu, select Connection Connect.

  3. For Server, enter the name of a DC.

  4. For Port, enter 389.

  5. Click OK.

  6. From the menu, select Connection Bind.

  7. Enter a user and password with the necessary credentials.

  8. Click OK.

  9. From the menu, select Browse Search.

  10. For BaseDN, type the DN of the Partitions container (e.g., cn=partitions,cn=configuration,dc=rallencorp, dc=com).

  11. For Filter, enter:

    (&(objectcategory=crossRef)(systemFlags:1.2.840.113556.1.4.803:=5))
  12. For Scope, select One Level.

  13. Click the Options button.

  14. For Attributes, type dnsRoot.

  15. Click OK.

  16. Click Run.

Using a command-line interface

Use the following command to find all of the application partitions in a forest:

> dsquery * cn=partitions,cn=configuration,<ForestDN> -filter[RETURN]
"(&(objectcategory=crossRef)(systemFlags:1.2.840.113556.1.4.803:=5))"[RETURN]
-scope onelevel -attr dnsRoot

Using VBScript

' This code displays the application partitions contained in the ' default forest set objRootDSE = GetObject("LDAP://RootDSE") strBase = "<LDAP://cn=Partitions," & _ objRootDSE.Get("ConfigurationNamingContext") & ">;" strFilter = "(&(objectcategory=crossRef)" & _ "(systemFlags:1.2.840.113556.1.4.803:=5));" strAttrs = "cn,ncName;" strScope = "onelevel" set objConn = CreateObject("ADODB.Connection") objConn.Provider = "ADsDSOObject" objConn.Open "Active Directory ...

Get Active Directory Cookbook 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.