No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

How to add distributiongroup to a Dynamic Distributiongroup

  • 3 Followers
  • 10 Replies |
  • This post has 1 verified answer |
Answered (Verified) This question is answered

We have a mixed enviroment with both federated and onpremis-accounts.We use Distributiongroups connected to Mailcontacts to generate direct forwarding of mail to a mailadress in our domain to a external maildomain.

 

With Powershell I have managed to create a Dynamic distributiongroup that use the deparment-attributewith the help of this forum and Help-topics.

But now I would also add these distributiongroups to my dynamic distributiongroups.

Is this possible? Do distributiongroups have any attributes that I can set & use?

The Name & Displayname of the distributiongroups does not follow any standard so
it would be hard create a good filter on those.

 

Any ideas?

  • Post Points: 50
Verified Answer
All Replies
  • Hi Anders,

    I understand that you prefer to add distribution groups to a Dynamic Distribution group.

    To achieve your goal, you can refer the following article:
    http://technet.microsoft.com/library/bb738157(EXCHG.80).aspx

    You can run the following command:
    New-DynamicDistributionGroup -Name NewDDG  -RecipientFilter (alias -eq "dg-01")

    Thanks,
    Monica Tong

    • Top 10 Contributor
    • Post Points: 0
    Suggested by
  • Hi Anders,

    How are things going? Is the issue resolved?

    Thanks,
    Monica Tong

    • Top 10 Contributor
    • Post Points: 0
  • Hello Monica

    Thank you for your reply.

    I have been out of the office therefore the late response.

    In your code you use the Alias-property to do a filter, but if I want a user to be member of several DynDG then I would have to change the Alias

    every time I create a new dynDG and add a value specific for the new dynDG or if I want to remove a user then I would have to find that value in his

    Alias and just remove that part. That dont seem to be "admin"-friendly. :( and the Alias would be quit long.

    Is there any way I can set multiple smtp-adresses on a distributiongroup and then use a recipientFilter to do a like-comparison to see if a part of the emailadress is present?

    Example:

    Distributiongroup to add to a DynDG:

    Displayname: Adam King

    SMTP: adam.king@domain.com

    smtp:DynOwner.adam.king@domain.com

    smtp:DynVicePresident.adam.king@domain.com

    The I would like to create a DynDG for owners & vicepresident.

    New-DynamicDistributionGroup -Name NewDDG  -RecipientFilter (EmailAddresses -like "*DynOwner*" or EmailAddresses -like "*DynVicePresident*")

    Would this find the second & third emailadresses of Adam Kings Distributiongroup and send him the mail sent to NewDDG?

    • Not Ranked
    • Post Points: 0
  • Hi Anders,

    You can add the other addresses as proxy address on a distribution group. Then run the command you mentioned above.

    Thanks,
    Monica Tong

    • Top 10 Contributor
    • Post Points: 0
  • Hi Anders,

    Is the issue resolved? Do you need any further assistance with this question?

    Thanks,
    Monica Tong

    • Top 10 Contributor
    • Post Points: 0
  • Thank you for your help. I will start coding and try your code as soon as time allows :)

    • Not Ranked
    • Post Points: 0
  • Hello again

    I have now had time to do some testing and after a while I got it almost right.

    This code creates the DynDG

    New-DynamicDistributionGroup -Name "TestPS Owner DynDL"  -RecipientFilter {((EmailAddresses -like "DynOwner*") -or (EmailAddresses -like "DynVicePresident*"))}

    I also tried this code to exclude any typo with the -or parameter:

    New-DynamicDistributionGroup -Name "TestPS Owner DynDL"  -RecipientFilter {(EmailAddresses -like "DynOwner*")}

    But when I list the members of the DDG its empty :(

    $DDG = Get-DynamicDistributionGroup "TestPS Owner DynDL"

    Get-Recipient -RecipientPreviewFilter $DDG.RecipientFilter

    I have a user with this proxyadress added to him:

    Primary adress: testpsnewuser16@domain.com

    proxy: DynOwner.testpsnewuser16@domain.com

    Any ideas on how to get this to work?

    • Not Ranked
    • Post Points: 0
  • Hello Anders,

    I have found some additional links that may assist you. If you experience any problems, I recommend consulting a Microsoft Partner, if you do not have one, already. The resources I found are:

    help.outlook.com/.../dd264649.aspx - "Create Dynamic Distribution Groups Using Precanned Filters"

    help.outlook.com/.../dd264647.aspx - "Create Dynamic Distribution Groups Using Customized Filters"

    help.outlook.com/.../Dd264653.aspx - "Additional Parameters You Can Use with Dynamic Distribution Groups"

    Thank you,
    Ken Berg
    O365 Support
    • Top 500 Contributor
    • Post Points: 0
  • Thank you Ken.

    I have no problem with creating the Dynamic Distribution Distributiongroup, the problem I have now is how to get the customized filter to accept

    emailadresses as parameter and locate the proxyadress of the user.

    according to this article:

    technet.microsoft.com/.../bb738157(EXCHG.80).aspx (Filterable Properties for the -RecipientFilter Parameter in Exchange 2007 SP1 and SP2)

    I can use the attribute EmailAddresses in the recipient filter. (Or has that changed i Exchange 2010?)

    Property name: EmailAddresses

    LDAP display name: proxyAddresses

    Description: This property contains the e-mail addresses of this recipient. All Exchange 2007 e-mail address types are valid. Separate multiple values by using commas.

    Value: E-mail address, Wildcard character accepted

    I use this code to create the filter:

    --code--

    New-DynamicDistributionGroup -Name "TestPS2 Owner DynDL"  -RecipientFilter {(EmailAddresses -like "DynOwner.testpsnewuser16@domain.com")}

    --end code--

    I have a user that have these two mailadresses:

    testpsnewuser16@domain.com (primary)

    DynOwner.testpsnewuser16@domain.com

    But when sending a mail to TestPS2 Owner DynDL nothing is delivered to testnewuser16 so the recipeintfilter is not working as I expect it to do.

    Im thinking of open a new thread with this specifik question on recipientfilter since the initial question is answered, I can add a DG to a DynDG and use filters to include the DG.

    Should I set this thread as solved and open a new thread?

    • Not Ranked
    • Post Points: 0
  • Hello Anders,

    Yes I would recommend doing just that. Customized filters are beyond my support boundary, but it may help to put the question out to the community in a new thread.

    Thank you,
    Ken Berg
    O365 Support
    • Top 500 Contributor
    • Post Points: 0
Page 1 of 1 (11 items)