Data Centers

Creating a dynamic distribution list in Exchange


If you’ve managed an Exchange server for any length of time, you’ve probably created distribution lists. There are times, however, when a static distribution list just won’t cut it. In a previous tip (Synchronizing Exchange distribution lists), I wrote about an Exchange project at the college where I am CIO. As part of that project, we wanted to have e-mail lists on a per-dorm basis. Unfortunately, dorm occupancy can change hourly, and we didn’t want to devote a full-time person to handling only distribution list changes. The alternative was to automate the process using a dynamic distribution list.

On the Active Directory/Exchange side, it was a matter of making sure that AD attributes for each student were being updated on a regular basis. From there, we made heavy use of dynamic distribution lists to do the rest. Here's how to create a dynamic distribution list.

First, you need to populate Active Directory fields with consistent information that can be used to tie people together. For example, in the Department field, you might, interestingly enough, indicate the department in which each user works. As you populate Active Directory, it's really important to maintain data consistency. For example, for people in the IT department, label them all the same. Don't label some with "IT" and others with "I.T."

Also, you might find it helpful to create an AD OU that has the sole purpose of housing your distribution lists. I've created an OU in my organization called DLs for this purpose.

Here is the step-by-step guide to creating the distribution lists:

  1. Start Active Directory Users and Computers.
  2. Right-click the OU in which you want to create the dynamic distribution list and, from the shortcut menu, choose New > Query-based Distribution Group.
  3. On the first screen of the wizard, provide a name for the new distribution group. The Alias field will be filled in automatically (Figure A). For sanity, I highly recommend that you keep group names simple and don't include spaces or special characters other than dashes.

Figure A

Provide a name for the new group.

Provide a name for the new group.

  1. On the next screen (Figure B) choose the Customize filter radio button and then click the Customize button.

Figure B

Click the customize button

Click the Customize button to decide how you want to configure the list.

  1. From the "In" drop down, choose Entire Directory to change the scope of the search. If you don't do this, the scope of the search will be limited to just the OU in which you store the DL. If you have multiple domains you can, of course, choose to limit the scope to a single domain as well. In this dialog box (Figure C), also click the Advanced tab.

Figure C

Determine scope of the search

Decide on the scope of the search and choose the Advanced tab.

  1. On the Advanced tab, click the Field button and choose the field on which you want to filter. In Figure D, I'm filtering based on the Department field.

Figure D

Choose a field

Choose a field on which you want to filter your results.

  1. Now, provide criteria for the filter. In this case (Figure E), I'm telling AD that I want all users in which the department field exactly matches "Information Technology." Once you provide criteria, click the Add button. You can filter on multiple items. For example, you might want to create a group that includes all of the IT employees that work in Area 51.

Figure E

Provide criteria and click Add.

Provide your criteria and click Add.

  1. Click OK and continue through the wizard until you are back at ADUC.
  2. Verify that the filter works by opening the properties for the new list and clicking on the Preview tab (Figure F).

Figure F

A look at the members of new list.

A look at the members of your new list.

About

Since 1994, Scott Lowe has been providing technology solutions to a variety of organizations. After spending 10 years in multiple CIO roles, Scott is now an independent consultant, blogger, author, owner of The 1610 Group, and a Senior IT Executive w...

4 comments
marka
marka

Excellent, I never thought to try this for distribution lists. thanks

jgarvey
jgarvey

Excellent Article! Has anyone devised a simple way to update contact email address's within a AD OU?

kyle
kyle

I never knew dynamic distribution lists existed, but I'm definitly going to look into setting them up. Thanks for the tip.

Editor's Picks