Export (0) Print
Expand All
Related Help Topics
Loading
No resources found.
Related Blog Articles
Loading
No resources found.
Expand Minimize

Search-MailboxAuditLog

 

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

Topic Last Modified: 2012-11-19

Use the Search-MailboxAuditLog cmdlet to search mailbox audit log entries matching the specified search terms.


Search-MailboxAuditLog [-Identity <MailboxIdParameter>] [-DomainController <Fqdn>] [-EndDate <ExDateTime>] [-ExternalAccess <$true | $false>] [-LogonTypes <MultiValuedProperty>] [-Organization <OrganizationIdParameter>] [-ResultSize <Int32>] [-ShowDetails <SwitchParameter>] [-StartDate <ExDateTime>]


Search-MailboxAuditLog [-DomainController <Fqdn>] [-EndDate <ExDateTime>] [-ExternalAccess <$true | $false>] [-LogonTypes <MultiValuedProperty>] [-Mailboxes <MultiValuedProperty>] [-ResultSize <Int32>] [-StartDate <ExDateTime>]

The Search-MailboxAuditLog cmdlet performs a synchronous search of mailbox audit logs for a specified mailbox and displays search results in the Exchange Management Shell window. To search mailbox audit logs for multiple mailboxes and have the results sent by e-mail to specified recipients, use the New-MailboxAuditLogSearch cmdlet instead. To learn more about mailbox audit logging, see Understanding 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.

 

Parameter Required Type Description

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.

EndDate

Optional

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 configured on 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 a time of day and date, you must enclose the argument in quotation marks ("), for example, "10/05/2010 5:00 PM".

ExternalAccess

Optional

System.Boolean

This parameter is reserved for internal Microsoft use.

Identity

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The Identity parameter specifies the mailbox for which to retrieve mailbox audit log entries. You can use this parameter to search a single mailbox.

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.

Mailboxes

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The Mailboxes parameter specifies the mailboxes for which to retrieve mailbox audit log entries. You can use this parameter to search audit logs for multiple mailboxes. You can't use the ShowDetails switch with the Mailboxes parameter.

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

This parameter is available for multi-tenant deployments. It isn't available for on-premises deployments. For more information about multi-tenant deployments, see Multi-Tenant Support.

The Organization parameter specifies the organization in which you'll perform this action. This parameter doesn't accept wildcard characters, and you must use the exact name of the organization.

ResultSize

Optional

System.Int32

The ResultSize parameter specifies the maximum number of mailbox audit log entries to return. Valid values include an integer from 1 through 250000. By default, 1000 entries are returned.

ShowDetails

Optional

System.Management.Automation.SwitchParameter

The ShowDetails switch specifies that details of each log entry be retrieved. By default, all fields for each returned log entry are displayed in a list view.

You can't use the Mailboxes parameter with the ShowDetails switch.

StartDate

Optional

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 configured on 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 a time of day and date, you must enclose the argument in quotation marks ("), for example, "10/05/2010 5:00 PM".

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.

This example retrieves mailbox audit log entries for Ken Kwok's mailbox for actions performed by Admin and Delegate logon types between 1/1/2010 and 12/31/2010. A maximum of 2,000 log entries are returned.

Search-MailboxAuditLog -Identity kwok -LogonTypes Admin,Delegate -StartDate 1/1/2010 -EndDate 12/31/2010 -ResultSize 2000

This example retrieves mailbox audit log entries for Ken Kwok and Ben Smith's mailboxes for actions performed by Admin and Delegate logon types between 1/1/2010 and 12/31/2010. A maximum of 2,000 log entries are returned.

Search-MailboxAuditLog -Mailboxes kwok,bsmith -LogonTypes Admin,Delegate -StartDate 1/1/2010 -EndDate 12/31/2010 -ResultSize 2000

This example retrieves mailbox audit log entries for Ken Kwok's mailbox for actions performed by the mailbox owner between 1/1/2010 and 3/1/2010. The results are piped to the Where-Object cmdlet and filtered to return only entries with the HardDelete action.

Search-MailboxAuditLog -Identity kwok -LogonTypes Owner -ShowDetails -StartDate 1/1/2010 -EndDate 3/1/2010 | Where-Object {$_.Operation -eq "HardDelete"}
 © 2010 Microsoft Corporation. All rights reserved.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft