none
How to add a member to a distributionlist ? RRS feed

  • Question

  • hi all,

    is it right that I have to use "Add-DistributionGroupMember" to add a member?
    Or may I use other commands too...?

    I wonder that this all is "group-centric" and not also "user-centric"....!!

    When I call "Get-Recipient" I'll get a ReducedRecipient with a property  "AddressListMembership" that
    contains all memberships. But it seems so, that I cannot use this as an integer collection to "set" all
    memberships of a recipient at once (e.g. using "Set-Mailbox")


    best regards
    and thanks in advance
    Wednesday, October 14, 2009 1:59 PM

All replies

  • Hi,

        Yes you will have to use Add-DistributionGroupMember Command to add a member to a DistributionGroup. No other command is available , except that You directly modify object in ActiveDirectory using DirectoryEntry class of .Net.

     I could not understand what r u trying to ask regarding AddressListMembership property of an Exchange Receipient. This property tells that to which Address Lists this recipient is a member of.  I mean Which address list contains this recipient when u view that address List. This property doesnt belong to Distribution group at all.

     Regards,

    Laeeq Qazi|Snr Software Engineer(Exchange + Sharepoint + BES + DynamicsCRM) www.hostingcontroller.com
    Thursday, October 15, 2009 9:08 AM
  • Hi,

    thank you for your answer.
    Of course you are right, that this was a mistake by me.

    Actually I tried to find a way (or more than one way),
    to add a recipient to an addresslist.

    best regards and thanks in advance
    Thursday, October 15, 2009 1:53 PM
  • Hi,

              You are welcome.

              Recipient are added to an Address List based on the RecipientFilter of Address List e.g If I create an Address List like this

              New-AddressList -Name SalesAL -Container '\' -IncludedRecipients 'AllRecipients' -ConditionalCustomAttribute1 Sales

              This means that This address list will contain all type of objects which have 'Sales' in their CustomAttribute1 . Later on if you want a recipient to be part of this address list, then you will have just have to put 'Sales' in the CustomAttribute1 of the recipient, and then call Update-AddressList ALName. This is how recipients are added to Address Lists in Exchange. There is no Set-Recipient Command so you will have to use Set-Mailbox, Set-DistributionGroup, Set-Mailcontact etc. 
     
               You can check RecipientFilter of Address List by 
                      
                      Get-AddressList | FL Identity,RecipientFilter 
                                OR for some specific AL

                    Get-AddressList 'AddressListName' | FL Identity,RecipientFilter 

              commands

              Regards,
              

    Laeeq Qazi|Snr Software Engineer(Exchange + Sharepoint + BES + DynamicsCRM) www.hostingcontroller.com
    • Proposed as answer by Laeeq Qazi Friday, October 16, 2009 10:13 AM
    • Edited by Laeeq Qazi Friday, October 16, 2009 10:18 AM changes
    Friday, October 16, 2009 10:04 AM