Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2
Topic Last Modified: 2012-11-19
Use the New-MailboxAuditLogSearch cmdlet to search mailbox audit logs and have search results sent via e-mail to specified recipients.
Syntax
New-MailboxAuditLogSearch [-Organization
<OrganizationIdParameter>] -EndDate <ExDateTime>
-StartDate <ExDateTime> -StatusMailRecipients
<MultiValuedProperty> [-Confirm [<SwitchParameter>]]
[-DomainController <Fqdn>] [-ExternalAccess <$true |
$false>] [-LogonTypes <MultiValuedProperty>] [-Mailboxes
<MultiValuedProperty>] [-Name <String>] [-ShowDetails
<SwitchParameter>] [-WhatIf [<SwitchParameter>]]
|
Detailed Description
The New-MailboxAuditLogSearch cmdlet performs an asynchronous search of mailbox audit logs for the specified mailboxes and sends the search results by e-mail to the specified recipients. The body of the e-mail 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 Shell window, use the Search-MailboxAuditLog 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.
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 e-mail address of one or more recipients to whom search results are sent by e-mail. |
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 retrieves data from 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:
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 Mailbox servers running on Microsoft 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 |
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. |
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.
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/2010 to 12/31/2010. Search results are delivered to auditors@contoso.com by e-mail.
Copy Code | |
---|---|
New-MailboxAuditLogSearch "Admin and Delegate Access" -Mailboxes "Ken Kwok","April Stewart" -LogonTypes Admin,Delegate -StartDate 1/1/2010 -EndDate 12/31/2010 -StatusMailRecipients "auditors@contoso.com" |