Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-11-19

Use the Set-MailboxSearch cmdlet to modify an existing mailbox search.

Caution:
Unless you use the SourceMailboxes parameter to specify which mailboxes you want to search, mailbox searches are performed across all computers running Microsoft Exchange Server 2010 in an Exchange organization.

If the search you want to modify is running, stop it before using the Set-MailboxSearch cmdlet. When restarting a search, any previous search results are removed from the target mailbox.

For more information about Exchange 2010 Multi-Mailbox Search, see Understanding Multi-Mailbox Search.

Syntax

Set-Mailboxsearch -Identity <SearchObjectIdParameter> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-DoNotIncludeArchive <SwitchParameter>] [-EndDate <ExDateTime>] [-EstimateOnly <SwitchParameter>] [-ExcludeDuplicateMessages <$true | $false>] [-Force <SwitchParameter>] [-IncludeUnsearchableItems <$true | $false>] [-Language <CultureInfo>] [-LogLevel <Suppress | Basic | Full>] [-MessageTypes <KindKeyword[]>] [-Name <String>] [-Recipients <String[]>] [-SearchDumpster <$true | $false>] [-SearchQuery <String>] [-Senders <String[]>] [-SourceMailboxes <RecipientIdParameter[]>] [-StartDate <ExDateTime>] [-StatusMailRecipients <RecipientIdParameter[]>] [-TargetMailbox <MailboxIdParameter>] [-WhatIf [<SwitchParameter>]]

Detailed Description

Unless specified, mailboxes on all Exchange 2010 Mailbox servers in an organization are searched. The search can be stopped, started, modified, and removed.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Multi-Mailbox Search" entry in the Messaging Policy and Compliance Permissions topic.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.SearchObjectIdParameter

The Identity parameter specifies the name of the mailbox search.

Confirm

Optional

System.Management.Automation.SwitchParameter

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

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory.

DoNotIncludeArchive

Optional

System.Management.Automation.SwitchParameter

The DoNotIncludeArchive parameter specifies whether items in the user's Archive mailbox are included in mailbox searches. By default, items in the user's Archive mailbox are included in mailbox searches. If set to $true, the DoNotIncludeArchive parameter instructs Multi-Mailbox Search to exclude archive mailboxes from the search.

EndDate

Optional

Microsoft.Exchange.ExchangeSystem.ExDateTime

The EndDate parameter specifies an end date for the search.

EstimateOnly

Optional

System.Management.Automation.SwitchParameter

The EstimateOnly switch specifies that only an estimate of the number of items that will be returned is provided. Messages aren't copied to the target mailbox.

ExcludeDuplicateMessages

Optional

System.Boolean

The ExcludeDuplicateMessages parameter eliminates duplication of messages across mailboxes.

Force

Optional

System.Management.Automation.SwitchParameter

The Force switch suppresses the confirmation prompt displayed before modifying a search. When modifying a search, previous search results are removed from the target mailbox, and the search is restarted after modification. The Force switch doesn't require a value.

IncludeUnsearchableItems

Optional

System.Boolean

The IncludeUnsearchableItems parameter specifies whether Multi-Mailbox Search includes unsearchable items in the search results. If set to $true, Multi-Mailbox Search includes unsearchable items in the search results. These items, regardless of whether they match the search criteria, are copied to the target mailbox.

Language

Optional

System.Globalization.CultureInfo

The Language parameter specifies a locale for the mailbox search.

LogLevel

Optional

Microsoft.Exchange.Data.Storage.Infoworker.MailboxSearch.LoggingLevel

The LogLevel parameter specifies a logging level for the mailbox search. Valid values are:

  • Basic   Basic details of the search are kept.

  • Full   In addition to details in the Basic logging level, a full list of all messages returned is included.

  • Suppress   Logging is suppressed. No logs are kept.

MessageTypes

Optional

Microsoft.Exchange.Data.Search.AqsParser.KindKeyword[]

The MessageTypes parameter specifies the message types that should be included in the mailbox search. Valid values include:

  • Email

  • Meetings

  • Tasks

  • Notes

  • Docs

  • Journals

  • Contacts

  • IM

Name

Optional

System.String

The Name parameter specifies a name for the search. The top-level folder created in the target mailbox, where items returned by the search are copied, is also named after the search name.

Recipients

Optional

System.String[]

The Recipients parameter specifies one or more recipients and is a part of the mailbox search query. Messages addressed to any recipient specified in the Recipients parameter are returned.

SearchDumpster

Optional

System.Boolean

The SearchDumpster parameter specifies whether the dumpster is searched. The dumpster is a storage area in the mailbox where deleted items are temporarily stored after being deleted or removed from the Deleted Items folder, or after being hard-deleted, and before being purged from the mailbox based on Deleted Item Retention settings.

By default, items in the dumpster aren't searched. Set the value to $true to enable searching the dumpster.

SearchQuery

Optional

System.String

The SearchQuery parameter specifies a search query using the Advanced Query Syntax. If a query isn't specified, the entire mailbox is copied to the target mailbox.

If other search parameters such as Senders, Recipients, Startdate, and EndDate are specified, these are combined by using the AND operator with the SearchQuery parameter.

Senders

Optional

System.String[]

The Senders parameter specifies one or more senders. Messages sent by the specified senders are returned by the search. Senders can include users, distribution groups, SMTP addresses, or domains.

If distribution groups are specified, messages sent by distribution group members are returned in the search results.

SourceMailboxes

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The SourceMailboxes parameter specifies the mailboxes to be searched by Multi-Mailbox Search. If no mailboxes are explicitly specified by using the SourceMailboxes parameter, all mailboxes located on Exchange 2010 servers across the entire organization are searched.

StartDate

Optional

Microsoft.Exchange.ExchangeSystem.ExDateTime

The StartDate parameter specifies a start date for the mailbox search. Messages dated on or after the start date are returned by the search.

StatusMailRecipients

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The StatusMailRecipients parameter specifies one or more recipients to receive a status e-mail message upon completion of the search.

TargetMailbox

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The TargetMailbox parameter specifies the mailbox to which items returned by the search are copied.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, 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 switch.

Input Types

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

Return Types

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

Examples

EXAMPLE 1

This example modifies the start date of a mailbox search.

Copy Code
Set-MailboxSearch -Name "Legal-ProjectX" -StartDate "01/01/2010"