Solved

How do you make a query based distribution group using AD in Server 2008 and Exchange 2007

Posted on 2010-09-09
17
1,264 Views
Last Modified: 2012-08-14
G'day all,
 In Server 2003 it looks pretty straight forward by right clicking on an OU in AD and selecting New->Query Based Distribution Group. I don't see this in Server 2008. Or if anyone can point me to an article that would be great.

Thanks all,
BW
0
Comment
Question by:bwinkworth
  • 7
  • 5
  • 5
17 Comments
 
LVL 5

Expert Comment

by:michael_b_smith
ID: 33637515
In Exchange 2007 and higher, they renamed the QBDQ to "Dynamic Distribution Group" and you now create the object in either the Exchange Management Console (Recipient Configuration -> Distribution Group) or the Exchange Management Shell (New-DynamicDistributionGroup).

As a corollary to separation of Exchange management and AD management, they removed the capability from ADUC after Server 2003.

Now, from an AD object perspective, there really isn't any difference to speak of. You can still use scripts and tools (ADSI, VBScript, etc.) to create the objects - but that isn't the "supported way".
0
 
LVL 28

Expert Comment

by:sunnyc7
ID: 33637587
0
 

Author Comment

by:bwinkworth
ID: 33639347
Thanks guys. Now that I've created one I'm trying to create a custom attribute. I'm within the properties of the DDG on the general tab within the custom attributes button. What exactly do you enter into these text boxes (there are 15 of them)? I've tried field names like cn for common name and displayName and then entered then name I wanted in 'Conditions' under 'Custom Attribute 1 equals Value' but nothing shows up when I preview it. I am in the right OU.
Am I even doing it right? Hmmm. It was so much easier in 2003 :)

BW
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 5

Expert Comment

by:michael_b_smith
ID: 33639681
Custom attribute fields are just text attributes on Exchange objects such as mailboxes. You either manually or programmatically put values in them and then use them for constructing Recipient Filters (or any OPATH filter).

So, for example, you want to have a way to figure out if someone is married or not. You decide to use custom attribute 3 for that. So, for all the mailboxes of people that are married, you edit the mailboxes and put "yes" into custom attribute 3.

Now, you can build a Recipient Filter that says { CustomAttribute3 -eq "yes" } to get those people who are married.
0
 
LVL 28

Expert Comment

by:sunnyc7
ID: 33639861
hi
You are creating a query based DDG based on what attributes ? Please specify

thanks
0
 

Author Comment

by:bwinkworth
ID: 33640830
Ok here's the big picture. I tend to rumble around in my thoughts of what I want lol. Sorry about that.
We have a lotus notes database that contains all of our external distributor contacts. What our programmer is going to do is create an sql query that imports them all into a container in AD. Then he wants me to create a DDG that will look at all the contacts in that container filtered by the condition of 'Department' for instance. Is that possible?
That make sense? Let me know if you need more info

Thanks guys,
BW
0
 
LVL 28

Expert Comment

by:sunnyc7
ID: 33640863
0
 

Author Comment

by:bwinkworth
ID: 33641157
sunnyc7, I think that would work if the user(s) were created as mail contacts first in Exchange. Once you've created a mail contact in Exchange it then also creates a corresponding  contact in AD. But if I create a 'Contact' in AD, it won't work because DDG is looking for objects in Exchange. I tested this theory by creating a contact in AD in the Users container. I went to Exchange and edited my DDG to look at that containter and told it to show me 'All Recipient Types' with no conditions and the contact wouldn't show up. But if I create a mail contact in Exchange first then it sees it. We want to bring in these contacts to AD from Lotus Notes and then run a DDG on those contacts in AD but doesn't look like it's going to see them.
Thanks again,
BW
0
 
LVL 5

Expert Comment

by:michael_b_smith
ID: 33641212
It'll work as soon as you mail-enable the contact. Or you could just create it as a mail contact to start with.
0
 

Author Comment

by:bwinkworth
ID: 33641321
Thanks Michael.
How do you mail enable a contact in AD? I've added an email address already. Is there something else?

Thanks,
BW
0
 
LVL 5

Accepted Solution

by:
michael_b_smith earned 125 total points
ID: 33641337
Enable-MailContact is the PowerShell cmdlet to mail-enable an existing contact. New-MailContact is the PowerShell cmdlet to create a new mail-enabled contact.
0
 
LVL 28

Expert Comment

by:sunnyc7
ID: 33641454
Create a file called c:\contacts.csv

with
name, email address
name1, email@domain1.com
name2, email@domain2.com
...

Run this

Import-CSV "C:\contacts.CSV" | ForEach-Object {Enable-MailContact -Identity $_.Name -ExternalEmailAddress $_.ExternalAddress}
0
 

Author Comment

by:bwinkworth
ID: 33645789
Thanks fellas for the info. I ran the mailenable powershell command for my test user. Now it adds them as a mail contact in Exchange. So when I have hundreds of contacts I'm assuming its normal for them to all show up in Exchange under 'Mail Contact'? Is this the norm for what I'm doing?
Sunnyc7, thanks for that import command. Is there a way for me to mailenable hundreds of contacts in AD using the powershell without having to create a csv file?

Appreciate the help and I'll be wrapping this up soon :D

BW
0
 
LVL 28

Assisted Solution

by:sunnyc7
sunnyc7 earned 125 total points
ID: 33645817
CSV is easier.

Export the AD as a txt file
Right click on the AD container in ADUC > Export List
This will save it as some text file.

Open it in excel - delete the second column.
then add their email addresses there
Save as .CSV

Use that CSV to run imports.

0
 

Author Comment

by:bwinkworth
ID: 33645918
I'm seeing a problem here. This whole process needs to be automated. Our coder will have a procedure that runs every night and dumps in new contacts into the AD container. So Exchange would have to see the new contacts and mail enable them. I don't think this is going to work.
Any thoughts?

BW
0
 
LVL 5

Expert Comment

by:michael_b_smith
ID: 33646180
Have your coder create them as mail contacts to start with - new-mailcontact.

Alternately, run a PowerShell script after the coder's program runs to mail-enable all the contacts he just created...
0
 

Author Closing Comment

by:bwinkworth
ID: 33648803
Thanks for the help fellas. Appreciate it.

BW
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question