Applies to: Exchange Server 2013

Topic Last Modified: 2012-10-11

Use the New-MailboxAuditLogSearch cmdlet to search mailbox audit logs and have search results sent via email to specified recipients.

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

Syntax

New-MailboxAuditLogSearch -EndDate <ExDateTime> -StartDate <ExDateTime> -StatusMailRecipients <MultiValuedProperty> [-Organization <OrganizationIdParameter>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-ExternalAccess <$true | $false>] [-LogonTypes <MultiValuedProperty>] [-Mailboxes <MultiValuedProperty>] [-Name <String>] [-ShowDetails <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Examples

EXAMPLE 1

This example creates a mailbox audit log search to search Ken Kwok and April Stewart's mailboxes for administrator and delegate logons from 1/1/2011 to 12/31/2011. Search results are delivered to auditors@contoso.com by email.

Copy Code
New-MailboxAuditLogSearch "Admin and Delegate Access" -Mailboxes "Ken Kwok","April Stewart" -LogonTypes Admin,Delegate -StartDate 1/1/2011 -EndDate 12/31/2011 -StatusMailRecipients "auditors@contoso.com"

Detailed Description

The New-MailboxAuditLogSearch cmdlet performs an asynchronous search of mailbox audit logs for the specified mailboxes and sends the search results by email to the specified recipients. The body of the email message contains search metadata such as search parameters and the time when the search request was submitted. The results are attached in an .xml file.

To search mailbox audit logs for a single mailbox and have the results displayed in the Exchange Management Shell window, use the Search-MailboxAuditLog cmdlet instead. To learn more about mailbox audit logging, see Mailbox Audit Logging.

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 "Mailbox audit logging" entry in the Messaging Policy and Compliance Permissions topic.

Parameters

Parameter Required Type Description

EndDate

Required

Microsoft.Exchange.ExchangeSystem.ExDateTime

The EndDate parameter specifies the end date and time to return mailbox audit log entries.

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".

StartDate

Required

Microsoft.Exchange.ExchangeSystem.ExDateTime

The StartDate parameter specifies the start date and time to return mailbox audit log entries.

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".

StatusMailRecipients

Required

Microsoft.Exchange.Data.MultiValuedProperty

The StatusMailRecipients parameter specifies the email address of one or more recipients to whom search results are sent by email.

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.

ExternalAccess

Optional

System.Boolean

This parameter is reserved for internal Microsoft use.

LogonTypes

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The LogonTypes parameter specifies the type of logons. Valid values include:

  • Admin   Audit log entries for mailbox access by administrator logons are returned.

  • Delegate   Audit log entries for mailbox access by delegates are returned, including access by users with Full Mailbox Access permission.

  • External   For cloud-based mailboxes, audit log entries for mailbox access by administrators of the cloud-based service are returned.

  • Owner   Audit log entries for mailbox access by the primary mailbox owner are returned.

If you specify the Owner logon type, you must use the ShowDetails switch. You can specify multiple values separated by a comma.

Mailboxes

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The Mailboxes parameter specifies one or more mailboxes for which to retrieve mailbox audit log entries. If you don't specify a value, mailbox audit logs for all mailboxes on Microsoft Exchange Server 2013 or Exchange Server 2010 in the Exchange organization are returned.

Name

Optional

System.String

The Name parameter specifies a name for the search.

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

The Organization parameter is reserved for internal Microsoft use.

ShowDetails

Optional

System.Management.Automation.SwitchParameter

The ShowDetails switch specifies that details of each log entry be retrieved.

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.