Back to blog

Error: Cannot convert value "" to type "System.Boolean" when disabling email forwarding in Office 365

4 Jun 2013 by emma.robinson

There is currently a bug in Office 365 which is preventing administrators from removing email forwarders from Office 365 mailboxes.

error Cannot convert value "" to type "System.Boolean".

Error Cannot convert value “” to type “System.Boolean”.

Here is how you can fix it using PowerShell.
First, connect to Office 365 using PowerShell.
Now run the set-mailbox cmdlet to set the email forwarding to $null ($null is PowerShell speak for nothing).
For example, to remove the forwarder for Ben, we run the following command.

Set-Mailbox ben -ForwardingAddress $null

Below you can see my PowerShell session. I first made sure Ben was the correct mailbox by doing a get-mailbox ben and selecting the Forwarding attributes.

PS C:\Users\burns_000\Desktop> get-mailbox ben | select *forward*
DeliverToMailboxAndForward ForwardingAddress ForwardingSmtpAddress
-------------------------- ----------------- ---------------------
False alan
PS C:\Users\burns_000\Desktop> Set-Mailbox ben -ForwardingAddress $null
PS C:\Users\burns_000\Desktop>

I then logged in to Office 365 to confirm that the forwarder was definitely removed.
User now has forwarding disabled

User now has forwarding disabled