Exchange 2010 re-index mailbox database

ems

Exchange 2010 re-index mailbox database

Users may report that searching Outlook for non-cached or online mode mailboxes isn’t getting the right results or not returning results past a certain date. Also OWA may return “The action couldn’t be completed.  Try again later.” when trying to search. You need to reindex your mailbox database(s). 

1. Run Repair-ExchangeSearchSymLinks.ps1. It isn’t included in the normal scripts folder under the Exchange program files, you can copy this to a text document and save it as Repair-ExchangeSearchSymLinks.ps1.

write-host "Attempting to repair symbolic links" 

write-host "Stopping msftesql-exchange and msexchangesearch services" 
stop-service -Force msexchangesearch 
stop-service -Force msftesql-exchange 

$rval = get-PSSnapin -Name Microsoft.Exchange.Management.PowerShell.Setup -ea SilentlyContinue 
if(!$rval) 
{ 
 add-PSSnapin -Name Microsoft.Exchange.Management.PowerShell.Setup -ea SilentlyContinue 
} 

write-host "Installing symbolic links" 
Install-ContentIndexingService –HubOnlyFilterRegistration 

if(!$rval) 
{ 
 Remove-PSSnapin -Name Microsoft.Exchange.Management.PowerShell.Setup -ea SilentlyContinue 
} 

write-host "Starting msftesql-exchange and msexchangesearch services" 
start-service msexchangesearch 
start-service msftesql-exchange 

write-host "Symbolic links restored." 
write-host "Please run test-exchangesearch to verify installation."

Or you can get it from Microsoft here if you don’t trust me and place it in the Exchange Server\V14\Scripts folder. Open Exchange Management Shell (remember you might need to run EMS elevated and run Set-ExecutionPolicy Unrestricted first), change path to the scripts folder then run:

.\Repair-ExchangeSearchSymLinks.ps1

 

2. Next run the ResetSearchIndex.ps1 script, this one is included in the Exchange program files scripts folder so no need to download. You can run it against a specific database or against all of them as per the commands below:

.\ResetSearchIndex.ps1 -All

.\ResetSearchIndex.ps1 databasename

 

You should see event id 109 for each database stating that an index has been created and sometime later event id 110 for each database as the indexing finishes.

 

One thought on “Exchange 2010 re-index mailbox database

  1. Ryan McVey says:

    This fix has worked for me in the past, even a few weeks ago! But for some reason currently I cannot get search working for the life of me. I figure it is a bad email box somewhere, but where do I start even to sort that out? How can I find and fix the corrupt one(s)? Any assistance with this issue? My users need search and I don’t want them all to have cached accounts.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>