Thursday, September 19, 2013

Office 365 Reciepient Policies



One of the requirements for moving to Office 365 hosted mailboxes is that all recipients MUST have “automatically update e-mail addresses based on email address policy” enabled. This often is disabled when changing account names due to marriage, etc. When changing the primary SMTP address on an Exchange mail enabled object the best practice is to change the alias and let the policy create the email address so that you don’t have to uncheck/check this property.

It’s pretty easy to find all of these objects via PowerShell.

get-recipient -ResultSize Unlimited -IgnoreDefaultScope -ReadFromDomainController | where-object{($_.EmailAddressPolicyEnabled -like "false")}  |select name, identity, RecipientType, EmailAddressPolicyEnabled | export-csv c:\msExchPoliciesExcluded.txt

You can change the get-recipient applet to get-mailbox or get-MailPublicFolder if you want to focus on them individually.  Exporting them to CSV allows you to take a quick look to make sure that the alias matches the email address so you’re not accidently changing someone’s primary SMTP address.

If everything looks good you can bulk enable the recipient policy with this one-liner:

get-mailbox -ResultSize Unlimited -IgnoreDefaultScope -ReadFromDomainController | where-object{($_.EmailAddressPolicyEnabled -like "false")}  |Set-Mailbox -EmailAddressPolicyEnabled $true

No comments:

Post a Comment