Wednesday, April 27, 2016

Exchange Hybrid Configuration Wizard fails with error HCW8073: PowerShell failed to invoke Set-EmailAddressPolicy

Issue:
Exchange Hybrid Configuration Wizard fails with error HCW8073: PowerShell failed to invoke 'Set-EmailAddressPolicy'.
HCW log under "%UserProfile%\AppData\Roaming\Microsoft\Exchange Hybrid Configuration" shows:

*ERROR* [Workflow=Hybrid, Task=Recipient, Phase=Configure] Microsoft.Online.CSE.Hybrid.Engine.TaskException: Task 'Recipient' failed during phase 'Configure': Set-EmailAddressPolicy -Identity 'Default Policy' -ForceUpgrade: $true -IncludedRecipients AllRecipients Errors PowerShell failed to invoke 'Set-EmailAddressPolicy': The recipient policy "Default Policy" with mailbox manager settings cannot be managed by the current version of Exchange Management Console. Please use a management console with the same version as the object. ---> Microsoft.Online.CSE.Hybrid.Engine.WorkflowException: 

HCW8073 PowerShell failed to invoke 'Set-EmailAddressPolicy': The recipient policy "Default Policy" with mailbox manager settings cannot be managed by the current version of Exchange Management Console. Please use a management console with the same version as the object.

When you try to update your address policy according to documentation on your Exchange Server 2010 or Exchange Server 2007:

Get-EmailAddressPolicy | where {$_.RecipientFilterType –eq “Legacy”} | Set-EmailAddressPolicy 
–IncludedRecipients AllRecipients
 
The recipient policy "Default Policy" with mailbox manager settings cannot be managed by the current version of Exchange
Management Console. Please use a management console with the same version as the object.
    + CategoryInfo          : InvalidOperation: (Default Policy:ADObjectId) [Set-EmailAddressPolicy], InvalidOperation
   Exception
    + FullyQualifiedErrorId : 7124D31B,Microsoft.Exchange.Management.SystemConfigurationTasks.SetEmailAddressPolicy

This happens when the Default Policy also includes Mailbox Manager settings. Since there are no Exchange 2003 servers anymore (or 2003 console) in this environment, you can’t remove the Mailbox Manager settings from the policy (ex. wrong upgrade procedure from Exchange Server 2003). Additionally you may have warning like this:


Get-EmailAddressPolicy | fl Identity,*type*,*version*,*manager*

Identity                 : Default Policy
RecipientFilterType      : Legacy
ExchangeVersion          : 0.0 (6.5.6500.0)
HasMailboxManagerSetting : True



Resolution:
Here’s how to fix this using ADSI Edit:
  • Run adsiedit.msc
  • In the Configuration container, navigate to CN=Recipient Policies,CN=<Exchange Org>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=<domain>,DC=<com> 
  • In the middle pane, view the properties of the Default Policy
  • Remove the value(s) of the msExchMailboxManagerFolderSettings attibute so that it’s now <Not Set> 
  • Edit the MsExchPolicyOptionList attribute and remove all the attributes that do not begin with 0xFC. The policy that begins with 0xFC is the email addressing policy.


FC 1C 49 26 50 9E 57 48 86 1B 0C B8 DF 22 B5 D7 = Address List pol
EC 13 68 3B 89 CE BA 42 94 42 D8 7D 4A A3 0D BC = MailBox Manager Policy

Now when you run Get-EmailAddressPolicy “Default Policy” | fl you will see that HasMailboxManagerSetting is set to False and you will be able to update the Default Policy.

[PS] C:\Windows\system32>Get-EmailAddressPolicy | fl Identity,*type*,*version*,*manager*

Identity                 : Default Policy
RecipientFilterType      : Precanned
ExchangeVersion          : 0.1 (8.0.535.0)
HasMailboxManagerSetting : False

Reference:
MVP blogs
Address List and EAP filter upgrades with Exchange Server 2007