Directory Services

Modifying Existing User Interfaces

The results pane of the Active Directory Users and Computers MMC snap-in displays several columns of attribute data for objects within a container, such as the Name and Description attributes. The snap-in enables the user to add and remove the attributes displayed in the results pane of the snap-in. To change the display, the user uses the View pull-down menu and selects Add/Remove Columns.... In the Add/Remove Columns dialog box, there is a list of attributes that the user can choose from to display in the results pane. The Active Directory Users and Computers MMC snap-in provided with Windows Server 2003, Standard Edition, Windows Server 2003, Enterprise Edition, and Windows Server 2003, Datacenter Edition provides the ability to add to the standard list of attributes that can be displayed in the results pane of the snap-in for a container. This feature only exists if the snap-in is targeted at a forest with Windows Server 2003 schema.

To add an attribute to the list, add a value to the extraColumns attribute of the displaySpecifier object that the attribute that you wish to display is associated with.

The extraColumns attribute is a multi-valued string attribute where each string is in the following format.

<ldapdisplayname>,<column header>,<default visibility>,<width>,<unused>
The following table lists the contents of these values.
Value Description
<ldapdisplayname> Contains a string that represents the ldapDisplayName of the attribute.
<column header> Contains a string that represents the text displayed in the header for the column.
<default visibility> Contains a numeric value that is 0 if the attribute is hidden by default or 1 if the attribute is visible by default.
<width> Contains the width of the column, in pixels. If this value is -1, the width of the column is set to the width of column header.
<unused> Unused. Must be zero.

For example, to add a column to the list that will display the canonical name for objects in a container, a value for the canonicalName attribute is added to the extraColumns attribute of the container-Display object in the DisplaySpecifier container. The string added to the extraColumns attribute of the container-Display object will look like the following.

canonicalName,Canonical Name,0,150,0

To display an attribute in all container types, add a value for the attribute to the extraColumns attribute of the default-Display object in the DisplaySpecifier container.