Wednesday, 3 February 2016

Create an Email address policy based on a Database

We have a client who has 2 different databases within their exchange server, i needed to have different primary SMTP addresses for the recipients within these 2 database.  The main policy added an email based on the Alias of the user which was fine for the first database but needed a different primary email for the second database.

So again i went to the Internets and found this very helpful article.


What i did first was i created a basic policy within the GUI and made sure that the email address was what i wanted it to be i.e %s%1g@domain.com, I made sure i didn't apply the policy yet, if you do you will apply those changes to ALL email enabled users.  Then went to the management shell and ran this command:

Set-EmailAddressPolicy "test" -RecipientFilter { (Database -eq "CN=General Database,CN=First Storage Group,CN=InformationStore,CN=Exchange2003ServerName,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=contoso,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com") }

Use get-mailbox | fl to get the distinguished name of the server, once you have run this command goto the policy within the GUI, right click and apply immediately.  You will see it has a filter on it so you know you have been successful in applying the filter.

-Fr33ze

No comments:

Post a Comment