Skip to Content
Active Directory Cookbook
book

Active Directory Cookbook

by Robbie Allen
September 2003
Intermediate to advanced
624 pages
15h 49m
English
O'Reilly Media, Inc.
Content preview from Active Directory Cookbook

10.10. Viewing a Class

Problem

You want to view the attributes of a class.

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, 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.
' ------ SCRIPT CONFIGURATION ------
' 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 & "," & _
                         objRootDSE.Get("schemaNamingContext"))
objClass.GetInfo
WScript.Echo "Properties for " & strClassName
DisplayAttributes(objClass.ADsPath)

Discussion

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Active Directory Administration Cookbook

Active Directory Administration Cookbook

Sander Berkouwer
Active Directory Cookbook, 3rd Edition

Active Directory Cookbook, 3rd Edition

Laura E. Hunter, Robbie Allen
Active Directory Cookbook, 4th Edition

Active Directory Cookbook, 4th Edition

Brian Svidergol, Robbie Allen

Publisher Resources

ISBN: 0596004648Supplemental ContentCatalog PageErrata