Wednesday, November 13, 2013

Office 365 Reciepient Policies - Part 2



You may find that the default address policy does not apply automatically even though you have checked “Automatically Apply Email address policy” and “Allow Inheritable permissions” checked.  Take a look at your email address policies. Make sure the default policy has the highest priority. Check to see If you have any policies that were created pre-Exchange 2007 that were not converted and have not been applied in Exchange 2007. If these polices were applied to an object in Exchange 2000/2003 and not upgraded to 2007 then those objects will not get the new default address applied.

Delete the invalid policy and the force applying the policy with this one liner:

Get-mailbox -ResultSize Unlimited | set-mailbox -ApplyMandatoryProperties

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