Skip to main content

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

Popular posts from this blog

Downloading a shared file from Onedrive for business using Powershell

I thought I'd quickly share this script I came up with to download a file that was shared using One Drive for Business (which is SharePoint under the covers) with Powershell. The following script takes a OneDrive for business URL which would look like This script is pretty simple it uses the SharePoint CSOM (Client side object Model) which it loads in the first line. It uses the URI object to separate the host and relative URL which the CSOM requires and also the SharePointOnlineCredentials object to handle the Office365 SharePoint online authentication. The following script is a function that take the OneDrive URL, Credentials for Office365 and path you want to download the file to and downloads the file. eg to run the script you would use something like ./spdownload.ps1 '

A walk-though using the Graph API Mailbox reports in Powershell

Quite recently the Reporting side of the Graph API has moved in GA from beta, there are quite a number of reports that can be run across various Office365 surfaces but in this post I'm going to focus on the Mailbox related ones. Accessing Office365 Reports using Powershell is nothing new and has been available in the previous reporting endpoint however from the end of January many of these cmdlets are now being depreciated in favour of the Graph API . Prerequisites  In comparison to using the Remote PowerShell cmdlets where only the correct Office365 Admin permissions where needed, to use the new Graph API reports endpoint you need to use OAuth for authentication so this requires an Application Registration  that is then given the correct oAuth Grants to use the Reports EndPoin

How to test SMTP using Opportunistic TLS with Powershell and grab the public certificate a SMTP server is using

Most email services these day employ Opportunistic TLS when trying to send Messages which means that wherever possible the Messages will be encrypted rather then the plain text legacy of SMTP.  This method was defined in RFC 3207 "SMTP Service Extension for Secure SMTP over Transport Layer Security" and  there's a quite a good explanation of Opportunistic TLS on Wikipedia .  This is used for both Server to Server (eg MTA to MTA) and Client to server (Eg a Message client like Outlook which acts as a MSA) the later being generally Authenticated. Basically it allows you to have a normal plain text SMTP conversation that is then upgraded to TLS using the STARTTLS verb. Not all servers will support this verb so if its not supported then a message is just sent as Plain text. TLS relies on PKI certificates and the administrative issue s that come around certificate management like expired certificates which is why I wrote th
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.