Export (0) Print
Expand All
3 out of 9 rated this helpful - Rate this topic



Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1

Topic Last Modified: 2009-05-05

Use the Test-ExchangeSearch cmdlet to test that search is currently enabled and is indexing new e-mail messages in a timely manner.

Test-ExchangeSearch [-Identity <MailboxIdParameter>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-IndexingTimeout <Int32>] [-MonitoringContext <$true | $false>] [-WhatIf [<SwitchParameter>]]

Test-ExchangeSearch [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-IndexingTimeout <Int32>] [-MonitoringContext <$true | $false>] [-Server <ServerIdParameter>] [-WhatIf [<SwitchParameter>]]

The Test-ExchangeSearch cmdlet creates a message and attachment that only the Microsoft Exchange search can find. Unless a mailbox is specified in the Identity parameter, the message is stored in the System Attendant mailbox. The command waits for the message to be indexed and then searches for the content. The command reports success if the message content is found. The command reports failure if the content is not found after the interval set in the IndexingTimeout parameter has elapsed.

To run the Test-ExchangeSearch cmdlet, the account you use must be delegated the following:

  • Exchange Recipient Administrator role
  • Exchange Server Administrator role and local Administrators group for the target server

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.


Parameter Required Type Description




To specify the fully qualified domain name (FQDN) of the domain controller that retrieves data from the Active Directory directory service, include the DomainController parameter in the command.




The Identity parameter specifies the recipient that you want to test the search against. If this parameter is not specified, the System Attendant mailbox is used.




The IndexingTimeout parameter specifies the maximum amount of time to wait between adding the new e-mail message to the test mailbox and waiting for it to be returned in a search result. The default value is 2 minutes. If this parameter is not specified, the default interval is used.




The MonitoringContext parameter specifies an XML output file to write to for Microsoft Operations Manager.




The Server parameter specifies the Exchange server of the recipient that you want to test the search against.




The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You do not have to specify a value with the Confirm parameter.




The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.


Error Description


Exceptions Description

This example tests whether search is enabled for the user, John@contoso.com.

Test-ExchangeSearch -Identity john@contoso.com
To ensure that you are reading the most up-to-date information and to find additional Exchange Server 2007 documentation, visit the Exchange Server TechCenter.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.