September 2003
Intermediate to advanced
624 pages
15h 49m
English
You want to view the properties of an attribute.
Open the Active Directory Schema snap-in.
In the left pane, click on the Attributes folder.
In the right pane, double-click the attribute you want to view.
Click on each tab to view the available properties.
In the following command, replace
<AttrCommonName> with the common
name (not LDAP display dame) of the attribute you want to view:
> dsquery * cn=schema,cn=configuration,<ForestRootDN> -scope onelevel -attr *[RETURN] -filter "(&(objectcategory=attributeSchema)(cn=<AttrCommonName>))"
' This code displays the attributes for the specified attributeSchema object
' Refer to Recipe 4.2 for the DisplayAttributes( ) function code.
' ------ SCRIPT CONFIGURATION ------
' Set to the common name (not LDAP display dame) of the attribute
strAttrName = "<AttrCommonName>" ' e.g. surname
' ------ END CONFIGURATION ---------
set objRootDSE = GetObject("LDAP://RootDSE")
set objAttr = GetObject("LDAP://cn=" & strAttrName & "," & _
objRootDSE.Get("schemaNamingContext"))
objAttr.GetInfo
WScript.Echo "Properties for " & strAttrName & ":"
DisplayAttributes(objAttr.ADsPath)In the CLI and VBScript solutions, I mention that you need to specify
the common name or cn of the attribute you want to view. The common name is a source of confusion for many people. For example, the surname attribute has the following distinguished name in ...