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:
- Start Active Directory Users and Computers.
- 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.
- 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.
Provide a name for the new group.
- On the next screen (Figure B) choose the Customize filter radio button and then click the Customize button.
Click the Customize button to decide how you want to configure the list.
- 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.
Decide on the scope of the search and choose the Advanced tab.
- 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.
Choose a field on which you want to filter your results.
- 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.
Provide your criteria and click Add.
- Click OK and continue through the wizard until you are back at ADUC.
- Verify that the filter works by opening the properties for the new list and clicking on the Preview tab (Figure F).
A look at the members of your new list.
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 with CampusWorks, Inc. Scott is available for consulting, writing, and speaking engagements and can be reached at email@example.com.