Friday 11 March 2011

Email address policy firstname@domain with Exchange and PowerShell

If you don't know of Exchange (2010) E-mail Address policies, you should. If all your company's people should have an address firstname.lastname@somedomain.com and a secondary address firstname.lastname@somedomain.net and then suddenly a new address firstname@somedomain.com -- you need E-Mail Address Policies.

Not only that, but you also need PowerShell, since the Exchange console Email Address Policy editor does not support arbitrary email address templates. One address template it can't handle is just that, firstname@anywhere, for which you need Powershell.

Fire up your Exchange Management Shell and enter something along this line:

Set-EmailAddressPolicy -Identity 'Default Policy' -EnabledPrimaryAddressTemplate "smtp:%g.%s@somedomain.com" -EnabledEmailAddressTemplates "smtp:%g.%s@somedomain.net", "smtp:%g@somedomain.com"

That last bit was the magic one. Substitute the 'Default Policy' to whatever policy you're editing and the somedomain.com to suite your organization.

9 comments:

  1. Awesome thanks. Looked high and low trying to find an easy way to do this

    ReplyDelete
  2. Thanks for your information, it was really very helpfull.. Email List

    ReplyDelete
  3. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. email list

    ReplyDelete
  4. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. hotmail email

    ReplyDelete
  5. Nice to be visiting your blog again, it has been months for me. Well this article that i’ve been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. Google Maps Scraper

    ReplyDelete
  6. This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article. download email extractor 1.4 lite

    ReplyDelete
  7. The content is utmost interesting! I have completely enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great, and your efforts are outstanding! bulk free

    ReplyDelete
  8. I totally agree with how approachable the new online course of this naming brand is. A As new to this, they made the lessons very easy to understand and entertaining.   Email Extractor

    ReplyDelete
  9. In this particular article, you will see a summary, satisfy browse this post. How do I scrape data from Google Maps?

    ReplyDelete