Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

Home > Success Center > Server & Application Monitor (SAM) > AppInsight for Exchange: Search-Mailbox cmdlet and indexing

AppInsight for Exchange: Search-Mailbox cmdlet and indexing

Table of contents
No headers

In order to utilize the Search-Mailbox cmdlet using -SearchQuery filters, Content Indexing (CI) must be enabled and the service must be running. AppInsight for Exchange uses this to determine attachment size and count. To query this information, use the following commands:

  • DB's with indexing disabled: Get-MailboxDatabase | Where-Object {$_.IndexEnabled -eq $False} | Select-Object Identity
  • DB's with indexing enabled: Get-MailboxDatabase | Where-Object {$_.IndexEnabled -eq $True} | Select-Object Identity
  • 2010 Search Service not running: Get-Service -Name "MSExchangeSearch" | Where-Object {$_.Status -ne "Running"}
  • 2010 Search Service is running: Get-Service -Name "MSExchangeSearch" | Where-Object {$_.Status -eq "Running"}
  • 2013 Search Service not running: Get-Service -Name "MSExchangeFastSearch" | Where-Object {$_.Status -ne "Running"}
  • 2013 Search Service is running: Get-Service -Name "MSExchangeFastSearch" | Where-Object {$_.Status -eq "Running"}

If the status of the CI is any other than Healthy or Seeding, use of the Search-Mailbox cmdlet will be affected. If you encounter a database with indexing disabled, run the following command to enable it:

  • Set-MailboxDatabase -Identity "<db_name>" -IndexEnabled $true</db_name>

If all databases on a server have indexing disabled, use the following command:

  • Get-MailboxDatabase -Server "<server_name>" | Set-MailboxDatabase -IndexEnabled:$True</server_name>

If the search service is not running on Exchange 2010, execute the following commands:

  • Set-Service MSExchangeSearch -StartupType Automatic
  • Start-Service MSExchangeSearch

If the search service is not running on Exchange 2013, execute the following commands:

  • Set-Service MSExchangeFastSearch -StartupType Automatic
  • Start-Service MSExchangeFastSearch

If the Content Index of the active  database copy is not healthy, take the following actions:

  1. Stop the search service
  2. Delete the CI files
  3. Restart the search service on the server.

Note: The Content Index state of passive copies do not affect the performance of the Search-Mailbox cmdlet, but should be addressed if not in a Healthy or Seeding state.

 

Last modified
20:48, 30 Nov 2016

Tags

Classifications

Public