O'Reilly logo

Active Directory Cookbook by Robbie Allen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10.17. Finding the Structural, Auxiliary, Abstract, and 88 Classes

Problem

You want to list the structural, auxiliary, abstract, and 88 classes.

Solution

Using a graphical user interface

  1. Open the Active Directory Schema snap-in.

  2. In the left pane, click on the Classes folder.

  3. In the right pane, the list of all the classes will be displayed. The Type column contains the type of class. Even though you can click on the column header, it currently does not sort the classes by type.

Using a command-line interface

> dsquery * cn=schema,cn=configuration,<ForestRootDN> -limit 0 -scope onelevel[RETURN]
-filter "(objectcategory=classSchema)" -attr lDAPDisplayName objectclasscategory

Using VBScript

' This code prints out classes of a particular type ' ------ SCRIPT CONFIGURATION ------ ' Set the following to TRUE or FALSE depending if you want to ' view or not view classes of the type defined by the variable boolShowStructural = TRUE boolShowAuxiliary = TRUE boolShowAbstract = TRUE boolShow88 = TRUE ' ------ END CONFIGURATION --------- set objRootDSE = GetObject("LDAP://RootDSE") set objSchemaCont = GetObject("LDAP://cn=schema," & _ objRootDSE.Get("configurationNamingContext")) objSchemaCont.Filter = Array("classSchema") WScript.Echo "Loading classes, this will take a few seconds." for each objClass in objSchemaCont WScript.StdOut.Write(".") if objClass.Get("objectClassCategory") = 0 then str88 = str88 & vbTab & objClass.Get("lDAPDisplayName") & vbCrlf elseif objClass.Get("objectClassCategory") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required