HMC tips for Exchange: Part 2 - Adding a distribution list

The second tip is distribution lists, which are also kind of an important thing to get set up. To do this, you need to craft a CreateDistributionList XML request—this is just an XML file that looks like:

<request>
    <data>
        <container>LDAP Path</container>
        <preferredDomainController>Domain Controller</preferredDomainController>
        <managedBy>List Owner</managedBy>
        <name>List Name</name>
    </data>
    <procedure>
        <execute namespace="Hosted Email 2007" procedure="CreateDistributionList" impersonate="1">
            <before source="data" destination="executeData" mode="merge" />
            <after source="executeData" destination="data" mode="merge" />
        </execute>
    </procedure>
</request>

Sample:

<request>
    <data>
        <container>LDAP://OU=MyCustomer,OU=MyReseller,OU=Hosting,DC=litware,DC=local</container>
        <preferredDomainController>srv01</preferredDomainController>
        <managedBy>frank@test.com</managedBy>
        <name>Triage</name>
    </data>
    <procedure>
        <execute namespace="Hosted Email 2007" procedure="CreateDistributionList" impersonate="1">
            <before source="data" destination="executeData" mode="merge" />
            <after source="executeData" destination="data" mode="merge" />
        </execute>
    </procedure>
</request>

You can then run that on your HMC server using the provtest command. So how do you manage who is actually in the list? Well, this is actually very easy, thanks to Outlook. First, just open an email and type the list name into the line, then right-click and select Properties:

You can then use the Modify Members button to add or remove members of this list.

Note: This can only be done by the list owner, which you specified when you created the list in the managedBy node.