?
Solved

How to create Dynamic Distribution List Applied to an OU

Posted on 2008-06-18
13
Medium Priority
?
3,366 Views
Last Modified: 2012-05-05
Hi there,
An expert kindly showed me how to create a dynamic distribution list which i have attached below.
However when i created this it was applied to the users ou.
I have no users in the standard ou so it did not work.
I figured out how to apply this to the root domain, however now my list includes all service and non user email addtresses which i dont want, i only want a dynamic distribution list of user email addresses.
I tryed to apply this to the ou we have all users in but it did not seem to recognize the ou.
could someone give me an example im using exchange 2007


New-DynamicDistributionGroup -Name "Some Group Name" -RecipientFilter {(WindowsEmailAddress  -like '*@domain.com')}
0
Comment
Question by:dougdog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 6

Expert Comment

by:DocCan11
ID: 21817945
new-DynamicDistributionGroup -Name 'test' -IncludedRecipients 'MailboxUsers' -OrganizationalUnit 'Adatum.com/Legal' -Alias 'test' -RecipientContainer 'Adatum.com/Legal'

ok.. you will need to replace the OrganizationalUnit with yours and I made it only for mailbox users. .if you need it different let me know
0
 

Author Comment

by:dougdog
ID: 21820342
hi there,
thanks basically what i need is the following
i have two accepted domains on my exchange 2007 server.
i want distribution groups for both companies to include all primary smtp email addresses for that company.
I dont want it to include system and resource email address.
so i was going to apply it to my all company users ou, which i think will filter thgrough the sub domains
0
 

Author Comment

by:dougdog
ID: 21820381
just to be more clear
i want a distribution list for each compnay based on the users primary email address.
but i dont want it to include all the system and resource email accounts we have setup.
Can i be applied to an ou
if it is applied to an ou does it filter to sub ou etc
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
LVL 6

Expert Comment

by:DocCan11
ID: 21824078
ok.. sorry I did not get back to this sooner.. First the above will search all sub folders.. just give me a bit to work on the other part of the problem..
0
 
LVL 6

Expert Comment

by:DocCan11
ID: 21824146
I will post this in a number of replies.. First about your recipients.. the -includedRecipients parameter that I used will not find your system or room or equipment mailboxes.. it only finds users that you have created that have mailboxes.. it will not catch mail enabled users (users that have external addresses).. I can use and OR statement if you need these as well ..

0
 
LVL 6

Expert Comment

by:DocCan11
ID: 21824191
make sure you know that it is not the organizationalunit parameter that is catching the users it should find but the -recipientContainer parameter
0
 
LVL 6

Expert Comment

by:DocCan11
ID: 21824237
It seems to get exactly what you want you are going to need a combination of both our answers since the command does not allowing a neat piping solution..

new-DynamicDistributionGroup -Name 'test' -RecipientFilter {(WindowsEmailAddress  -like '*@domain.com')} -OrganizationalUnit 'Adatum.com/Legal' -Alias 'test' -RecipientContainer 'Adatum.com/Legal'

now the -organizationalunit parameter is where you want to store the resulting distribution group.. you will need to change the -recipinetcontainer parameter to be the location in AD you want to start your search from.. This should solve it for you ..
0
 

Author Comment

by:dougdog
ID: 21825575
no problem
thanks so much for youre help so far, the addresses i dont want to include are addresses that i have created however like backup@domainname ups@domainname etc.
these i could put in a seperate ou
would that work
0
 

Author Comment

by:dougdog
ID: 21831775
im thinking
would it be possiblem to create a dynamic distribution group based on primary smtp address apply it to domain level (that way i would know that all users are being picked up even if they are in the wrong ou.
then try and have a group that is excluded from tghe group which i could put the users and accounts that i dont want in the list ie
excluded users group which contains ups@domain admin@domain enquiry@domain etc
0
 

Author Comment

by:dougdog
ID: 21906047
anyone
0
 
LVL 6

Expert Comment

by:DocCan11
ID: 21907357
sorry I missed this.. I will look at it today
0
 

Author Comment

by:dougdog
ID: 21911445
no prob
0
 
LVL 6

Accepted Solution

by:
DocCan11 earned 2000 total points
ID: 21925594
I am sorry it has taken so long to reply to this but I have been flying all over the place lately.. Ok.. you can modify the query I gave you above, specifically you will need to modify the following --- RecipientFilter {(WindowsEmailAddress  -like '*@domain.com')} . You can modify it by adding and -AND command

RecipientFilter {(WindowsEmailAddress  -like '*@domain.com') -AND ( (WindowsEmailAddress -ne 'backup@domainname') -OR (WindowsEmailAddress -ne ' ups@domainname ')))}

if you want more examples.. here is a good site..

http://technet.microsoft.com/en-us/library/bb124268(EXCHG.80).aspx

again sorry I was so slow..
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

649 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