I'm using PowerShell to create mail contacts (external users, not employees) in Exchange 2013 but they are automatically being assigned internal addresses according to the mailbox policies.
For example, I create a contact called "Test User" with an email address "[email protected]". The contact is created and the primary address is the google address as expected. In addition, the default policy is applied and adds an address like "[email protected]" to the contact's alternate addresses. If I delete it, it's reassigned immediately.
The problem is that 6 months later when I hire an employee who should receive the valid address "[email protected]", it's unavailable and he gets "[email protected]". If I re-apply rules strategically, I can give him the address I want and give the contact an invalid address instead but that's a lot of work and it all gets peeled back if another admin re-applies in the wrong order afterward.
So - why are email policies applied to contact objects in the first place? And can you stop that from happening?
You need to change your email address policy to exclude
Mail contacts with external email addresses
. Apparently you cannot provision a mail contact without the email address policy applying to it, you just have to exclude them from that policy. You can change the setting after the contact has been provisioned but would have to remove the address.Set-MailContact -EmailAddressPolicyEnabled:$False
I used the following to create contacts:
Using any other method still tagged the contact with the internal address. This has been tested and it works.