Dynamic Distribution List creation
I am trying to create a DDL on my Excange 2007 server. Many of the posts seem to suggest using Power Shell. Is this the only way to truly set it up? In my test of creation, I don't see how I can make it functional. This is what I am doinf and where I get lost.I choose to creat the DDL. For the OU I am using MyCompany.com/Mail distribution. For Filter Settings I tried both All recipient types and Users with Exchange Mailboxes. Under Conditions I want to use the Office field from AD soI used Custom Attribute 1 andunder Step 2I tried the word "Office" andalso tried the LDAP name"physicalOfficeDeliveryName". Choosing Preview dosn't give me anything. I thought that maybe I should try CN=Bldg AStaff,OU=West,OU=Broadway,DC=MyCompany,DC=com but that didn't produce anything either. I need to create a DDL that includes people at multple sites, but not everyone so I want to use group membership. I created Query-based Distibution groups in Ex 2003 and this is just not the same. Ideas? Suggestions? TIA
January 14th, 2009 7:55pm
Hi Stebe,Actually there are limited options available to selected in step 1 conditions while creating DDG through GUI. Why don't you use EMS to create it. Please check below couple of articles from Bharat Suneja to understand how to create and things to keep in mind while creating it.HOW TO: Create a Dynamic Distribution Group by country or cityhttp://exchangepedia.com/blog/2007/08/how-to-create-dynamic-distribution.htmlDynamic Distribution Group quirkiness in Exchange 2007http://exchangepedia.com/blog/2007/08/new-dynamic-distribution-group.htmlAn Example: To create DDG for the users who have Office field populated AD with value Office1New-DynamicDistributionGroup -Name "Office1 Users" -OrganizationalUnit "Bldg A Staff" -RecipientContainer "yourdomain.com" -RecipientFilter {RecipientType -eq "UserMailbox" -and Office -eq "Office1"}Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2009 8:33pm
Thanks for the info. I am definitely learning that I have a lot more to learn! This is what I type in at the EMS console;New-DynamicDistributionGroup -Name "Distrib test" -OrganizationalUnit "OU=Bldg A,OU=West,OU=Broadway,DC=mycompany.com" -RecipientContainer "mycompany.com" -RecipientFilter {RecipientType -eq "UserMailbox" -and Office -eq "Maintenace Staff"}What I got was everyone in the whole domain that has "Maintenance Staff" in Office field of the AD General Tab. I will want Bldg A, Bldg B and Bldg C Maintenance Staff, but not the other buildings. I though that I could look in AD to either modify or delete it but I don't see anything called Distrinb Test. I went into EMS and typed in$Group = Get-DynamicDistributionGroup -Identity "Distrib Test" and thentyped in Get-Recipient -Filter $Group.RecipientFilter to see that the group does exist and has more users than I thought it would. I think that I am going the right direction but am still on the wrong set of tracks. Thank you again for responding.
January 14th, 2009 11:42pm
Hi Stebe,- You need to find this DDG in Exchange Management Console -> Recipient Configuration -> Distribution Lists to delete it or you can useRemove-DynamicDistributionGroupcmdlet to remove the DDG.- Since we used a switch -RecipientContainer "MyCompany.com", it searches all recipients in your whole domain. If you remove that switch then it just searches recipients which are available only in organizational unit which is mentioned in switch-OrganizationalUnit "OU=Bldg A,OU=West,OU=Broadway,DC=mycompany.com".Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
January 15th, 2009 6:37am
Please review the second example in the this article
January 15th, 2009 12:07pm
I found the group that I created. I had to close my MMC and reopen it. Maybe that will change in the future or maybe it is just something screwy with my computer. In either case I can live with that since I now know what to do. Here is my latest attempt at getting this to work correctly. I would like it to get everyone in the Maint OU but instead it picks up everyone with "Building A" in the Office field of AD. We have a Grounds OU, Executive OU, etc., and I don't want them all to be in the group. MaybeI am missing the correct syntax ofRecipientContainer portion? New-DynamicDistributionGroup -Name "Distrib Test M" -OrganizationalUnit "OU=Distribution Groups,DC=mycompany.com"-RecipientContainer "OU=Maint,OU=Bldg A,OU=West,OU=Broadway,DC=mycompany.com" -RecipientContainer "mycompany.com" -RecipientFilter {RecipientType -eq "UserMailbox" -and Office -eq "Building A"}
Free Windows Admin Tool Kit Click here and download it now
January 17th, 2009 2:37am
Hi Stebe,- When you create any new object it basically displayed at the bottom of list in EMC or you may need to refresh the list by F5. You may need to increase the number of object to display in the console by selecting in "Modify the maximum number of recipient to display". These are tips and tricks of EMC and you will learn day by day while working on it.... :)- I could see two "RecipientContainer" switches in your last cmdlet. Remove second one and that should be all set....New-DynamicDistributionGroup -Name "Distrib Test M" -OrganizationalUnit "OU=Distribution Groups,DC=mycompany.com"-RecipientContainer "OU=Maint,OU=Bldg A,OU=West,OU=Broadway,DC=mycompany.com" -RecipientFilter {RecipientType -eq "UserMailbox" -and Office -eq "Building A"}Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.com
January 17th, 2009 9:34am
Amit,Thank you for your persistance. I only had oneRecipientContainer in my statment. I keep all of my tests in a word document so that I know what I tried and I copied the wrong one intothe forum. My script is excactly like the last one you wrote.I am still getting everyone that has "Bldg A" in the Office field even though they are in different OUs. For example the Finance OU in Bldg A is at the same level as Maint. If I go into the MMC and look at the object "Distrib Test M", on the Filter tab, the recipiant container that it shows is mycompany.com/Broadway/west/Bldg A/Maint. In the same tab under Recipients Filter it has ((RecipientType -eq 'UserMailbox' -and Office -eq 'Building A') -and -not(Name -like 'SystemMailbox{*') -and -not(Name -like 'CAS_{*'))
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2009 7:46pm