So your company just bought another company. Or you’re moving to Exchange Online. Or you registered a new domain. Any reason, really, that you could want an email address template added to all of your Email Address Policies.
Not so bad if you have one or two policies But what if you have 10? Or 50? Or 200? We have some enterprise customers that have even more. What if you want to just apply it to some of them? Got you covered.
*channels Samuel L. Jackson*
When you absolutely, positively, got to stamp every EAP in the org–accept no substitutes.
Download the full script at the end of the post or head over to the TechNet Gallery.
- Launch the Exchange Management Shell, then run this script.
- Enter the domain for which you wish to configure a template. The script will verify that it’s an accepted domain
- Specify the template format. The default is %m (alias), but you can use any of the normal template replacement strings (see https://support.microsoft.com/en-us/kb/822447for some ideas).
- %m – Alias
- %s – Surname (last name)
- %g – Given Name (first name)
- %I – Middle Initial
- %d – Display Name
- Choose whether you want to apply the template to all email address policies or selectively.
- If you choose “yes,” it will be added to all that don’t have an existing template that matches the format you entered.
- If you choose “no,” you will be prompted to add the template to each policy.
Note: These changes will only affect new objects. If you want to apply the updated policies to all users, run Get-EmailAddressPolicy | Update-EmailAddresPolicy.