Exchange Discovery Search broken: discovery mailbox can’t be found

Issue: At one of my customers, the Discovery Search feature of Exchange stopped working when performing searches from EMC.  This error may be displayed:

Unable to execute the task.  Reason: The discovery mailbox, a hidden default mailbox that is required to search mailboxes, can't be found.  It may have been inadvertently deleted.  This mailbox must be re-created before you can search mailboxes.

Unable to execute the task. Reason: The discovery mailbox, a hidden default mailbox that is required to search mailboxes, can’t be found. It may have been inadvertently deleted. This mailbox must be re-created before you can search mailboxes.

Cause:  I determined this may be due to the System Mailbox or Discovery Search mailbox being deleted, modified, or damaged.

Taking inventory:  

1) Confirm both the System Mailbox and Discovery Search Mailbox exist in AD and Exchange:  “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}”.  If one or both is missing then it’s clear what the issue is.  On my system, I believed the client had modified the Discovery Search Mailbox in some way, I also suspected the System Mailbox had issues as well.

In order to re-create either the System Mailbox or the Discovery Search Mailbox you must first find and delete them both from both Exchange Management Console and Active Directory.  Lets first take inventory:

This command lists the discovery search mailboxes in the organization:
Get-Mailbox -Resultsize unlimited -Filter {RecipientTypeDetails -eq “DiscoveryMailbox”}

If the Discovery Search Mailbox exists in the organization the output will show the following:
DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852} 

The following commands will help you determine if the SystemMailbox exists:

get-user -arbitration

If all of the System Mailboxes Exist, then you should see the following output:
SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}
SystemMailbox{1f05a927-af78-475a-aba4-fc281398eb54}
FederatedEmail.4c1f4d8b-8179-4148-93bf-00a95fa1e042

It’s possible the system mailboxes are there but are not actually configured as system mailboxes anymore, in that case you need to perform the following to find them:

Get-User “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}”

Get-User “SystemMailbox{1f05a927-af78-475a-aba4-fc281398eb54}”

Side Note: If the system mailboxes show up with the above commands, but not with the ‘-arbitration’ switch then you have found one of your problems and the mailbox should be deleted and re-created.

Review AD to see if the AD accounts for these mailboxes exist:
Exchange System Mailboxes In AD Users and Computers

Note – System Mailbox AD accounts are disabled by default

Now that are done taking inventory we know where we stand and what we may be missing.

Resolution:

In my situation, I removed any instances of “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}” and “DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852}” from both the Active Directory Users container as well as their corresponding Exchange Mailbox, if found.  If either the AD account or Mailbox is missing, then you need to go ahead and remove the other.  In order to test for that condition, perform the following commands which will fail if either the AD Account or Mailbox is missing one of the System Mailboxes.

Remove-Mailbox “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}” -Arbitration

OR:

Remove-Mailbox “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}”

Verify it’s gone:

Get-User “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}” -Arbitration

Get-User “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}”

The “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}” mailbox should no longer appear.

Also remove the DiscoverySearchMailbox by the same means.

After I removed “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}” and the DiscoverySearchMailbox from Active Directory I then proceeded to re-create them.

Re-create Exchange 2010 System Mailboxes:

Locate the Exchange 2010 Media or SP2 media (it must match the installed version of Exchange).  Open an elevated command prompt and run “Setup.com /PrepareAD

Once completed, open the Exchange Management Shell again and run:

Get-User “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}”

The “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}” user will show display as a regular user.  To complete the process and make it a system mailbox perform the following:

Enable-Mailbox “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}” -Arbitration

This will enable the “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}” user as an arbitration mailbox.

The following command will fix the newly created DiscoverySearchMailbox and designate it as a the special Discovery Search Mailbox:

Enable-Mailbox -Discovery “DiscoverySearchMailbox {D919BA05-46A6-415f-80AD-7E09334BB852}”

After this point I tested and discovery search was back online.

Resources:
https://technet.microsoft.com/en-us/library/gg588318(v=exchg.141).aspx

4 thoughts on “Exchange Discovery Search broken: discovery mailbox can’t be found

  1. Faysal Sharif

    Thanks , it worked for me……….

    you didn’t add the permissions !!!
    Add-MailboxPermission “DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852}” -User “Discovery Management” -AccessRights FullAccess -InheritanceType all

    Reply
    1. Chris Harris Post author

      You may need to re-type to quotes in the command sometimes those don’t copy/paste correctly into powershell or contain weird formatting. Did your alternate command work successfully?

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.