Error: “You cannot migrate mailbox off of Office365 while the mailbox has a connected account enabled.”

Scenario:  When offboarding a mailbox, you receive the following error:

“You cannot migrate mailbox  off of Office365 while the mailbox has a connected account enabled.”

Solution: You will have to remove the subscription before offboarding the mailbox.

First,  check the subscription to make sure its not anything that’s going to affect the user:

get-subscription –mailbox stevem| FL IncomingServer, SubscriptionType, *Status*, LastSuccessfulSync,IncomingUserName

If it all looks good, run the following to remove the subscriptions:

get-subscription -mailbox stevem | Remove-subscription



Performing a Search-Mailbox with complex search criteria

Scenario: Batman is at it again.  He is now under litigation hold for attacking Superman and you want to search in Superman’s mailbox for any message that was received and sent by Batman, or specific terms were in the Subject, Body, or attachments.  You are only interested for messages sent after 1/1/2012.


Search-Mailbox Superman -SearchDumpster -SearchQuery "(Received:1/1/2012..5/18/2016) AND ( OR OR OR OR 'Batman' OR 'Bruce' OR 'Wayne')" –targetmailbox BobTheLawyer -loglevel full -targetfolder "Search_Batman"

​Error moving user to Office 365 (onboarding)

​Error moving user to Office 365 (onboarding)
“The user doesn’t have a matching SMTP address with target destination domain”
User has a mailbox on prem and need to be onboarded to Office 365
Resolution: Run dirsync and ensure user is fully synced. The mailbox on prem must have corresponding mail user in Office 365. Move was successful after dirsync

something went wrong UserHasNoMailboxException

Issue: Customer couldn’t access office 365 mailbox using the unified URL and kept getting “something went wrong, user has nomailboxexception” errors.
Notes: Customer was running hybrid configuration with Office 365 and Exchange 2013. Also the mailbox is a remote mailbox
Resolution: TargetOWAURL for the organization relationship at customer site was
Issue was resolved when customer modified remote routing address of the remote mailbox to
The service domain in the target OWA url needs to match the remote routing address of the remote mailbox

modify domain names for hybrid org relationship

​Task: Modify domain names configured for an organization relatinship in a hybrid deployment
you can use powershell command below to complete task
$domains = (get-organizationrelationship ‘On Premises to Exchange Online Organization Relations
Set-organizationrelationshp -id  ‘On Premises to Exchange Online Organization Relations

hip’ -domainnames $domains

Offboarding and Onboarding Mailboxes

Offboarding and Onboarding mailboxes to/from Office365
Moving mailboxes 2-way can be done using the EAC from Office365. You may also connect Powershell to Office365 and run any of the scripts below:
Onboarding to Cloud:
$opcred = get-credential [domainadmin]
Get-Mailbox xx| New-MoveRequest -Remote -RemoteHostName ‘’ -RemoteCredential $opcred -TargetDeliveryDomain ‘’
Offboarding from the Cloud to OnPrem:
$opcred = get-credential [domainadmin]
Get-Mailbox xx| New-MoveRequest -OutBound -RemoteTargetDatabase ‘Mailbox Database xxxxxxxx’ -RemoteHostName ‘’ -RemoteCredential $opcred -TargetDeliveryDomain ‘domain name’

Outlook web app is out of date

Issue: you try to login with office 365 homed mailbox, from the on-prem login url and you get the error ” your OWA is out of date”
Resolution: Check the remote mailbox properties and ensure target address is set with the correct address. You can also use powershell to fix by typing
set-remotemailbox -id test -remoteroutingaddress
the alias must be an alias​