locked
Create Distribution Groups in Exchange 2007 RRS feed

  • Question

  • Hello All,

    I'm having problems on creating Distribution Groups (in Exchange Management Console -> Recipient Configuration -> Distribution Group). Follow other threads, there are 3 ways to do:

    1. Powershell script: I will have to deploy a web service to call these scripts on the Exchange server, but this is not my deployment scenario.

    2. Exchange web service (EWS): we can not use EWS to create Distribution Groups. Is that right?

    3. Use LDAP to create Distribution Groups directly in the Active Directory. But I do not know how to do this. If you have sample codes or some hints, please share with me.

    I'm using Exchange 2007.

    Many thanks for your answers,
    K
    Tuesday, July 7, 2009 4:02 AM

Answers

All replies

  • you want to implement it through coding or manually?
    Tuesday, July 7, 2009 7:33 AM
  • Thanks for reply! I want to implement it through coding.
    Tuesday, July 7, 2009 8:06 AM
  • Best way is to use Exchange Powershwll commands like

    new-DistributionGroup
    get-DistributionGroup
    set-DistributionGroup

    Or you can also mail-enable an existing group in AD without using PS commands, but you have to research exactly what attributes are needed to mail-enable an existing group without using PowerShell commands. You will have to directly manipulate those mail attributes for that object in AD. There is some post on internet regarding creating a mailbox for existing AD user directly in AD without using Powershell API. Search it , it will help you.

    Regard,



    Laeeq Qazi|Snr Software Engineer(Exchange + Sharepoint + BES + DynamicsCRM) www.hostingcontroller.com
    Wednesday, July 8, 2009 8:24 AM
  • Here is the blog for mailbox creation directly into AD without Exchange API:


    Regards,

    Laeeq Qazi|Snr Software Engineer(Exchange + Sharepoint + BES + DynamicsCRM) www.hostingcontroller.com
    • Marked as answer by MinhKha Wednesday, July 8, 2009 10:16 AM
    Wednesday, July 8, 2009 8:49 AM
  • Thank you very much!
    Wednesday, July 8, 2009 10:17 AM
  • Hi,

           You are always welcome.
           If you find anything new regarding mail-enabling a group directly into AD, then do post it here so that other could have benefit too. Thanx 


          Regards,

    Laeeq Qazi|Snr Software Engineer(Exchange + Sharepoint + BES + DynamicsCRM) www.hostingcontroller.com
    Wednesday, July 8, 2009 10:45 AM
  • Hi All,

    I need a help in creating a distribution list.
    When I am creating a distrobution list via code, it is getting created with the following properties:

    Group Scope: Global
    Group type: security

    I need to have group type as Distribution .

            enum GrpType : uint
            {
                UnivGrp = 0x08,
                DomLocalGrp = 0x04,
                GlobalGrp = 0x02,
                SecurityGrp = 0x80000000
            }
    ...
    .
    .
    .
        objGroup = root.Children.Add(strGroup, "group");
                            objGroup.Properties["displayName"].Add(strDisplayName);
                            objGroup.Properties["description"].Add(strDescription);
                                                    
                            objGroup.CommitChanges();
    What should i use for poperty Grouptype tp make a list global and group type as distribution.

    Thanks
    Varun
    Friday, January 22, 2010 7:03 PM
  • Hi,


    For making it global use:

    group.Properties["groupType"].Value = ActiveDs.ADS_GROUP_TYPE_ENUM.ADS_GROUP_TYPE_GLOBAL_GROUP;

    and if you want to make it exchange distribution group directly into AD then u will have to set few of its attribute like mail, alias etc. See the link in my above post, it wil help u.

    Regards,

    Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
    • Proposed as answer by Laeeq Qazi Saturday, January 23, 2010 2:13 PM
    Saturday, January 23, 2010 2:12 PM
  • Hi,
    Thanks for the reply.

    I tried this thing but not able to find ActiveDs.ADS_GROUP_TYPE_ENUM.ADS_GROUP_TYPE_GLOBAL_GROUP;

    I know it is an enum with some values. Can you please share the enum code also?

    Regards
    Varun
    Saturday, January 23, 2010 2:27 PM

  • Hi,

    Add a reference to ActiveDS Type Library, which is a windows COM component, and then put using ActiveDS; and then all names will b available to u from this namespace.


    Regards,

    Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
    Saturday, January 23, 2010 2:34 PM
  • Hi Laeeq,

    Thanks .. I managed to add ActiveDS reference and got the enum type..

    But still struggling to set it global.
    I set properties["mail"] and properties["Alias"] also.

    Any help on this will be very much helpful..

    Varun
    Sunday, January 24, 2010 4:35 AM