Tuesday, March 29, 2011

Exchange 2010 Administrator Audit log Powershell GUI

An interesting and useful new feature of Exchange 2010 is Administrator audit logging where each time a EMS cmdlet is run in the Exchange in the EMS, EMC or ECP this is logged. Within ECP you can do a search of the admin Audit logs and have the result emailed to you and what you receive in your inbox is an email with an a attachment called searchresult.xml. While this file contains a lot of great information there are a few problems with this format for administrators firstly is that OWA and Oultook will usually block the XML attachments so it can firstly be hard to get to the attachment. Secondly XML isn't the most readable format when it comes to trying to intemperate what was going on especially if you search across a larger number of days. So what I've put together is a GUI that first uses the EWS Managed API to find these any of these emails within your inbox and then gives you the option of exporting the raw xml or converting the XML to a CSV file or lastly using a separate report winform that groups the data retrieved and displays it back to the user. The later i think is a lot more useful as it lets you work more intuitively with the data and the better you can do this the more likely it is that you would spot an abnormality which is one to the purposes of auditing. eg this is what it looks like

Note this GUI currently only handles the Admin Audit logs not the Mailbox Audit log which are in a different format.

I've put a download of this script here


Anonymous said...

Hi Glen,
great tool!
You should have mentioned that you need to install the Exchange Web Services Managed API (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1)



Anonymous said...

Hi Glen,

Can you create a script which can automatically scan the Mailbox Audit logs of a particular mailbox and send the report to some other user (for eg. Admin) via email.

Erich Rockman said...

The Show Cmdlet and Show Modified parameters come up blank. I looked in the xml file and they are there. I am using the EWS api 1.2. Could that be the issue? Thanks.

Glen Scales said...

You need to update the DLL path for 1.2 eg change

$dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.1\Microsoft.Exchange.WebServices.dll"


$dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.2\Microsoft.Exchange.WebServices.dll"


Erich Rockman said...

I did that. I get as far as opening Show cmdlet parameters and show modified parameters. The windows come up blank. I am on SP2 w/CU2.