Adding Attributes to a Class

Enterprise Networking Planet content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.


In Part 2 of this series, I showed you how to create custom attributes. Now you must add those custom attributes to a class before you’ll be able to use them. Unless you’ve created an attribute that’s very similar to an existing attribute, it’s usually more practical to create a new object class than to simply make the attribute fit within an existing object class. This is especially true if you’re creating more than one new attribute.


Creating a Class Object

To create a class object, right-click on the Classes object in the Active Directory Schema snap-in and select the Create Class command from the resulting context menu. When you do, you’ll see a warning similar to the one that you saw when you created an attribute, telling you that this is a permanent action. After that, the process of creating a class is almost identical to that of creating an attribute. Simply enter a common name, LDAP Display Name, and an X.500 Object ID. The only aspect that differs is the Inheritance and Type section, in which you must enter the parent class (the class the new class will be based on). The Class Type section contains a drop-down list that gives you a choice of three class types. Because you’ll be adding custom attributes to this class, select Auxiliary Class from the Class Type drop-down list.


Adding Attributes

Now you’re ready to add your attributes to the class you’ve just created. To do so, expand the Class object in the console to reveal the classes it contains. Now, right-click on the class you created and select Properties from the resulting context menu to open the class’s properties sheet. On the properties sheet’s General tab, select the Show Objects Of This Class While Browsing check box. Next, switch to the Attributes tab. You can use the Add buttons on this tab to add mandatory and optional attributes. While you’re here, check out the Security tab; you can use it to control who has what rights to the class you’ve just created.


Adding the Class to a Structural Object

You’re just about done. Before you can use the newly created class, you must add it to a structural class object, such as a computer or a user. To do so, select the structural class object from the list of classes and right-click on it. Select Properties from the resulting context menu to open the class’s properties sheet. Select the Relationship tab, which lets you specify which auxiliary classes are included in the structural class. Simply click the Add button next to the Auxiliary Class section and select the auxiliary class you created earlier. Doing so will cause the structural class to inherit the attributes of the auxiliary class you created. In short, you’ve just added custom attributes to a structural class. //

Brien M. Posey is an MCSE who works as a freelance writer. His past experience includes working as the director of information systems for a national chain of health care facilities and as a network engineer for the Department of Defense. Because of the extremely high volume of e-mail that Brien receives, it’s impossible for him to respond to every message, although he does read them all.

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends, and analysis.

Latest Articles

Follow Us On Social Media

Explore More