Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Set-MailboxSearch

 

Applies to: Exchange Server 2013, Exchange Online

Topic Last Modified: 2013-12-12

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

For information about the parameter sets in the Syntax section below, see Syntax.

Set-MailboxSearch -Identity <EwsStoreObjectIdParameter> [-AllPublicFolderSources <$true | $false>] [-AllSourceMailboxes <$true | $false>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-DomainController <Fqdn>] [-EndDate <ExDateTime>] [-EstimateOnly <$true | $false>] [-ExcludeDuplicateMessages <$true | $false>] [-Force <SwitchParameter>] [-IncludeKeywordStatistics <SwitchParameter>] [-IncludeUnsearchableItems <$true | $false>] [-InPlaceHoldEnabled <$true | $false>] [-ItemHoldPeriod <Unlimited>] [-Language <String>] [-LogLevel <Suppress | Basic | Full>] [-MessageTypes <KindKeyword[]>] [-Name <String>] [-PublicFolderSources <PublicFolderIdParameter[]>] [-Recipients <String[]>] [-SearchQuery <String>] [-Senders <String[]>] [-SourceMailboxes <RecipientIdParameter[]>] [-StartDate <ExDateTime>] [-StatisticsStartIndex <Int32>] [-StatusMailRecipients <RecipientIdParameter[]>] [-TargetMailbox <MailboxIdParameter>] [-WhatIf [<SwitchParameter>]]

This example modifies the start date of a mailbox search.

Set-MailboxSearch -Identity "Legal-ProjectX" -StartDate "01/01/2010"

In Microsoft Exchange Server 2013, mailbox searches are used for In-Place eDiscovery and In-Place Hold. For In-Place eDiscovery, unless specified, mailboxes on all Exchange 2013 Mailbox servers in an organization are searched. To create an In-Place Hold, you must specify the mailboxes to place on hold using the SourceMailboxes parameter. The search can be stopped, started, modified, and removed.

ImportantImportant:
When you create a mailbox search using this cmdlet on an Exchange 2013 server, mailboxes on previous versions of Exchange aren't searched. You must search mailboxes on Exchange Server 2010 by running the command on an Exchange 2010 server.
CautionCaution:
Mailbox searches are performed across all Exchange 2013 servers in an Exchange organization, unless the search is constrained to fewer mailboxes by using the SourceMailboxes parameter.
If the In-Place eDiscovery 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, see In-Place eDiscovery and In-Place Hold.

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 "In-Place eDiscovery" and "In-Place Hold" entries in the Messaging Policy and Compliance Permissions topic.

 

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.EwsStoreObjectIdParameter

The Identity parameter specifies the name of the mailbox search.

AllPublicFolderSources

Optional

System.Boolean

This parameter is reserved for internal Microsoft use.

AllSourceMailboxes

Optional

System.Boolean

This parameter is reserved for internal Microsoft use.

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.

Description

Optional

System.String

The Description parameter specifies a description for the search.

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.

EndDate

Optional

Microsoft.Exchange.ExchangeSystem.ExDateTime

The EndDate parameter specifies an end date for the search.

EstimateOnly

Optional

System.Boolean

The EstimateOnly parameter 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 in an In-Place eDiscovery search.

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.

IncludeKeywordStatistics

Optional

System.Management.Automation.SwitchParameter

The IncludeKeywordStatistics switch specifies that the command generates and returns keyword statistics for the search.

IncludeUnsearchableItems

Optional

System.Boolean

The IncludeUnsearchableItems parameter specifies whether unsearchable items are included in search results. If set to $true, unsearchable items are included in the search results.

CautionCaution:
In Exchange 2013, unsearchable items aren't placed on hold for a query-based In-Place Hold. If you need to place unsearchable items on hold, you must create an indefinite hold (a hold without specifying any search parameters, which provides functionality similar to litigation hold in Exchange 2010).

InPlaceHoldEnabled

Optional

System.Boolean

The InPlaceHoldEnabled parameter specifies whether an In-Place Hold should be placed on items matching the search query. Set the parameter to $true to enable In-Place Hold. If the ItemHoldPeriod parameter isn't specified, items are held until the hold is removed by deleting the search or removing a mailbox from the search. You can add or remove mailboxes from a mailbox search by modifying the SourceMailboxes parameter. If you don't specify a search query, all specified mailboxes are placed on hold.

ImportantImportant:
If you attempt to place a hold but don’t specify mailboxes using the SourceMailboxes parameter, the command may succeed but the mailboxes are not placed on In-Place Hold.

ItemHoldPeriod

Optional

Microsoft.Exchange.Data.Unlimited

The ItemHoldPeriod parameter specifies the number of days for which to hold mailbox items matching the search query. The duration is calculated from the time the item is received or created in the mailbox.

Language

Optional

System.String

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.

PublicFolderSources

Optional

Microsoft.Exchange.Configuration.Tasks.PublicFolderIdParameter[]

This parameter is reserved for internal Microsoft use.

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.

SearchQuery

Optional

System.String

The SearchQuery parameter specifies a search query using the Advanced Query Syntax (AQS). 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. If no mailboxes are explicitly specified by using the SourceMailboxes parameter, all mailboxes located on Exchange 2013 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.

StatisticsStartIndex

Optional

System.Int32

The StatisticsStartIndex parameter is used by the Exchange Administration Center (EAC) to retrieve keyword statistics in a paged operation.

StatusMailRecipients

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

The StatusMailRecipients parameter specifies one or more recipients to receive a status email 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.

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.

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.

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.