Answered by:
Exchange 2007 primary addresses based on custom attribute

Question
-
Hello,
I'm trying to export Exchange mailboxes that have a custom attribute 13 of "Spain" and "Ireland". I need to then add a new SMTP address for them import and make it there primary, is this possible?
I looked at Get-Mailbox | select PrimarySmtpAddress | Export-CSV C:\temp\allmailboxes.csv but it does all and I can't see away of adding a new column and apply their new SMTP address and make it their primary?
I was hoping I could use some of your experiences.
Thanks
Friday, December 6, 2013 10:06 AM
Answers
-
If your intention is to simply create a different SMTP address and make it their primary SMTP address, why not consider using a E-Mail Address Policy?
If the new SMTP address can be generated using the normal variables (%m, %g, %s, etc.) then all you'd have to do is make the contents of CA13 the discriminator and place the new policy (or policies) ahead of the ones you have now.
new-emailaddresspolicy .... -ConditionalCustomAttribute13 'Spain' . . .
new-emailaddresspolicy .... -ConditionalCustomAttribute13 'Ireland' . . .
Or just use the GUI to create the policy if it's only a simple set of conditions.
--- Rich Matheisen MCSE&I, Exchange MVP
- Proposed as answer by Winnie LiangMicrosoft contingent staff, Moderator Tuesday, December 10, 2013 6:04 AM
- Marked as answer by Simon_WuMicrosoft contingent staff, Moderator Sunday, December 22, 2013 2:25 PM
Saturday, December 7, 2013 9:24 PM
All replies
-
If your intention is to simply create a different SMTP address and make it their primary SMTP address, why not consider using a E-Mail Address Policy?
If the new SMTP address can be generated using the normal variables (%m, %g, %s, etc.) then all you'd have to do is make the contents of CA13 the discriminator and place the new policy (or policies) ahead of the ones you have now.
new-emailaddresspolicy .... -ConditionalCustomAttribute13 'Spain' . . .
new-emailaddresspolicy .... -ConditionalCustomAttribute13 'Ireland' . . .
Or just use the GUI to create the policy if it's only a simple set of conditions.
--- Rich Matheisen MCSE&I, Exchange MVP
- Proposed as answer by Winnie LiangMicrosoft contingent staff, Moderator Tuesday, December 10, 2013 6:04 AM
- Marked as answer by Simon_WuMicrosoft contingent staff, Moderator Sunday, December 22, 2013 2:25 PM
Saturday, December 7, 2013 9:24 PM -
Hi,
We can refer to Rich Matheisen’s suggestion. E-mail address policies can generate the primary and secondary e-mail addresses for your recipients (which include users, contacts, and groups) so they can receive and send e-mail. We can create new E-Mail Address Policies for your Exchange mailboxes that have a custom attribute 13 of "Spain" and "Ireland" respectively.
Here are some examples about custom SMTP E-mail Address Policy below:
How to Create an E-Mail Address Policy By Using Recipient Filters
http://technet.microsoft.com/en-us/library/bb232194(v=exchg.80).aspx
E2K7: Creating Custom SMTP E-mail Address Policies Utilizing Various Replacement String Combinations
Thanks,
Winnie Liang
TechNet Community SupportTuesday, December 10, 2013 6:05 AMModerator