Tips for Working with Directory Services Templates in Visio 2002, Part 2

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Published: June 1, 2001

By Steve Scott and Karen Easterbrook

Microsoft Corporation

Applies to:
Microsoft Visio Enterprise Network Tools 2002

As promised, here are five more tips for making the most of the Active Directory, LDAP, and Novell Directory Services templates in Microsoft Visio 2002.

On This Page

Limit Your Import to a Configuration Context
Show Children
Use the Generic Object Shape
Change the Root Distinguished Name
Perform Multiple Imports

Limit Your Import to a Configuration Context

By default, the Microsoft Visio directory services templates document the objects that you, the administrator, created—users, computers, organizational units, and the like. But let's say that you only want to see such things as sites and subnets so you can plan modifications. Using the Active Directory template, you can limit the import to configuration context information from a directory.

When opening a directory services template, the Connect to Directory dialog box prompts you to either Work Offline or Import from a Live Directory. Select Import from a Live Directory, and then click Browse. In the Directory Browser dialog box, click the Configuration Context tab. At this point you'll see the structure of your configuration containers. Simply select the point where you want to begin the import, and then click OK to continue the importing process. After importing you'll see the selected portion of the configuration context structure in the Directory Navigator.

Show Children

There's a quick way to show your child objects in a diagram. Let's say you drag an object from the Directory Navigator to the drawing page, but don't bring out any of that object's children. Later you decide you want to see those children on the drawing page. Rather than drag each child object from the navigator to the diagram, simply right-click the parent object on the diagram and then click Show Children. All child objects to one level down only are automatically added to their parent in the diagram, so you'll have to repeat this procedure for each additional child level you want to add to the diagram.

Use the Generic Object Shape

The shapes in all three Visio directory services templates represent the most common objects in those directories—the same images you'd see in that directory service's administrative tools. But many objects don't have unique images defined for them, others are encountered only rarely, and still others are added by third party extensions to a directory service that we don't have access to.

So, what if you want to add an object that isn't in one of the templates? Just use the Generic Object shape. Each Visio directory services template has one. Drag the shape to your drawing page as you would any other shape. When prompted, assign it a class from a list of available classes from that directory's schema. The Generic Object will inherit all of the attributes appropriate to that class, and will take on the behavior of the selected class without changing its shape. The directory services templates also use the Generic Object shape for imported objects not represented by a unique schema shape.

Note: If you select a class that already has a shape in the stencil, the Generic Object appears in the diagram, but the Directory Navigator uses the correct shape.

Change the Root Distinguished Name

Okay, so now you've diagrammed a new structure, but you want to push it into an existing directory tree. What do you have to do? In your diagram, indicate the location in the directory tree where you want this new structure to go. Then export the diagram to an LDIF file that you can later import into the existing directory tree.

So let's say, for example, that you have a marketing organizational unit (OU) within the Active Directory of a company named Championzone. You've designed a new OU using the Active Directory template, and you want to add it to the marketing department. On the Directory Services menu, click Change Root DN. In the Distinguished Name of Root dialog box, enter the exact location of the target OU for the drawing. Make sure you use the syntax required by the target directory. For this example, using the Active Directory syntax, you'd enter the following: ou=Marketing,dc=Championzone,dc=com.

In the Directory Navigator, you'll see that the [Sub Tree], or root, for the diagram reflects the new target. By changing the root you've ensured that the LDIF file you create will contain the information needed to import the new structure into the correct OU.

Note: Make sure you always thoroughly test your LDIF file format before importing it into any existing directory structure.

Perform Multiple Imports

One of the key features of the Microsoft Visio directory services templates is that you don't have to import everything from a directory at once. Importing large numbers of directory objects can consume time and computer resources. With incremental imports, you can import only what you need, and when you need more, simply import more.

After successfully importing data into Microsoft Visio, right-click an object in the Directory Navigator. Select Import to grab additional items from the directory. Again, you'll be presented with filters you can apply to restrict how much is imported. Keep doing this until you've imported everything you want. This feature lets you create asymmetrical trees when, for example, you want to show all the top-level containers with the details of one specific organizational unit.

A few words of caution, though--if you import an object from a directory tree and then move it to a new parent in the Directory Navigator, you won't be able to import additional levels for that object. An object's path to the root of the directory tree determines the import levels, so if you move an object, the path to the root in the navigator is different from the root in your tree. Before moving an object in the Directory Navigator, make sure you've imported all the levels you need.

Fore more information, read Tips for Working with Directory Services Templates in Visio 2002, Part 1 on the TechNet Technology Center for Visio 2002.