Start-HistoricalSearch
Applies to: Exchange Online Protection, Exchange Online
Topic Last Modified: 2014-08-21
This cmdlet is available only in the cloud-based service.
Use the Start-HistoricalSearch cmdlet to start a new historical search.
For information about the parameter sets in the Syntax section below, see Syntax.
Start-HistoricalSearch -EndDate <DateTime> -ReportTitle <String> -ReportType <MessageTrace | MessageTraceDetail | DLP | TransportRule | SPAM | Malware> -StartDate <DateTime> [-DeliveryStatus <String>] [-Direction <All | Sent | Received>] [-DLPPolicy <MultiValuedProperty>] [-Locale <CultureInfo>] [-MessageID <MultiValuedProperty>] [-NotifyAddress <MultiValuedProperty>] [-Organization <OrganizationIdParameter>] [-OriginalClientIP <String>] [-RecipientAddress <MultiValuedProperty>] [-SenderAddress <MultiValuedProperty>] [-TransportRule <MultiValuedProperty>]
This example starts a new historical search named "Fabirkam Search" that has the following properties:
-
Date range January 1, 2014 to January 7, 2014
-
Report type Message trace
-
Sender address michelle@fabrikam.com
-
Internal notification email address chris@contoso.com
Start-HistoricalSearch -ReportTitle "Fabrikam Search" -StartDate 1/1/2014 -EndDate 1/7/2014 -ReportType MessageTrace -SenderAddress michelle@fabrikam.com -NotifyAddress chris@contoso.com
A historical search provides message trace and report details in a comma-separated value (CSV) file for messages that are between seven and ninety days old. There are limits to the number of historical searches you can perform in a 24 hour period; you’ll be warned if you’re nearing the daily quota. Cancelled searches count against the daily quota.
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 "View Reports" entry in the Feature permissions in Exchange Online topic.
| Parameter | Required | Type | Description |
|---|---|---|---|
| EndDate | Required | System.DateTime | The EndDate parameter specifies the end date of the date range. Use the short date format defined in the Regional Options settings for the computer on which the command is run. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 03/01/2010 to specify March 1, 2010. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, you must enclose the argument in quotation marks ("), for example, "10/05/2010 5:00 PM". |
| ReportTitle | Required | System.String | The ReportTitle parameter specifies a descriptive name for the historical search. If the value contains spaces, enclose the value in quotation marks ("). |
| ReportType | Required | Microsoft.Exchange.Management.FfoReporting.HistoricalSearchReportType | The ReportType parameter specifies the type of historical search that you want to perform. You can use one of the following values:
|
| StartDate | Required | System.DateTime | The StartDate parameter specifies the start date of the date range. Use the short date format defined in the Regional Options settings for the computer on which the command is run. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 03/01/2010 to specify March 1, 2010. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, you must enclose the argument in quotation marks ("), for example, "10/05/2010 5:00 PM". |
| DeliveryStatus | Optional | System.String | The DeliveryStatus parameter filters the results by the delivery status of the message. You can use one of the following values:
|
| Direction | Optional | Microsoft.Exchange.Management.FfoReporting.MessageDirection | The Direction parameter filters the results by incoming or outgoing messages. Valid values for this parameter are |
| DLPPolicy | Optional | Microsoft.Exchange.Data.MultiValuedProperty | The DLPPolicy parameter filters the results by the name of the DLP policy that acted on the message. You can specify multiple DLP policies separated by commas. |
| Locale | Optional | System.Globalization.CultureInfo | The Locale parameter filters the results by the locale of the message. Valid input for this parameter is a Microsoft .NET Framework CultureInfo class culture code value. For example, |
| MessageID | Optional | Microsoft.Exchange.Data.MultiValuedProperty | The MessageId parameter filters the results by the |
| NotifyAddress | Optional | Microsoft.Exchange.Data.MultiValuedProperty | The NotifyAddress parameter specifies the email addresses of internal recipients to notify when the historical search is complete. The email address must be in an accepted domain that's configured for your organization. You can enter multiple email addresses separated by commas. To view the results of the historical search, you need to specify at least one email address for the NotifyAddress parameter. Otherwise, you need to click on the completed message trace in the Exchange admin center at Mail flow > Message trace. |
| Organization | Optional | Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter | The Organization parameter is reserved for internal Microsoft use. |
| OriginalClientIP | Optional | System.String | The OriginalClientIP parameter filters the results by the original IP address of the message. For incoming messages, the OriginalClientIP value is the sender’s IP address. For outgoing messages, the OriginalClientIP value is the IP address of the external SMTP server that received the message. |
| RecipientAddress | Optional | Microsoft.Exchange.Data.MultiValuedProperty | The RecipientAddress parameter filters the results by the recipient's email address. You can specify multiple values separated by commas. |
| SenderAddress | Optional | Microsoft.Exchange.Data.MultiValuedProperty | The SenderAddress parameter filters the results by the sender's email address. You can specify multiple values separated by commas. |
| TransportRule | Optional | Microsoft.Exchange.Data.MultiValuedProperty | The TransportRule parameter filters the results by the name of the transport rule that acted on the message. You can specify multiple transport rules separated by commas. |
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.
