Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Overview of this book

Table of Contents (22 chapters)
Microsoft Exchange 2010 PowerShell Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Searching administrator audit logs


You can use the Exchange Management Shell to search the administrator audit logs and generate reports based on the cmdlets and parameters used to modify objects within your Exchange environment. Like mailbox audit log reports, we have two ways in which we can view the audit logs from the Exchange Management Shell, and in this recipe we'll take a look at both methods.

How to do it...

  1. To perform a synchronous administrator audit log search in the shell, we can use the Search-AdminAuditLog cmdlet. For example, after executing the following command, the results will be displayed in the shell:

    Search-AdminAuditLog -Cmdlets Set-Mailbox `
    -StartDate 01/1/2011 `
    -EndDate 01/31/2011 `
    -IsSuccess $true

    This command would return all of the log entries for the Set-Mailbox cmdlet for the month of January. Only the log entries from successful commands will be returned.

  2. To perform an asynchronous search, use the New-AdminAuditLogSearch cmdlet:

    
    New-AdminAuditLogSearch -Cmdlets...