10.10. Viewing a Class


You want to view the attributes of a class.


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, double-click the class you want to view.

  4. Click on each tab to view the available properties.

Using a command-line interface

In the following command, replace <ClassCommonName> with the common name (not LDAP display name) of the class you want to view:

> dsquery * cn=<ClassCommonName>,cn=schema,cn=configuration,<ForestRootDN> -scope[RETURN]
base -attr *

Using VBScript

' This code prints out the attributes for the specified class.
' Recipe 4.2 for the code for the DisplayAttributes( ) function.
' Set to the common name (not LDAP display dame) 
' of the class you want to view. 
strClassName = "<ClassCommonName>"   ' e.g. user
' ------ END CONFIGURATION ---------

set objRootDSE = GetObject("LDAP://RootDSE")
set objClass = GetObject("LDAP://cn=" & strClassName & "," & _
WScript.Echo "Properties for " & strClassName


See Table 10-1 for a list of the important classSchema attributes and their descriptions.

See Also

Recipe 4.2 for viewing the attributes of an object

Get Active Directory Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.