Skip to main content


Showing posts from April, 2014

Slide deck from my MEC Presentation "Using exchange as a platform for innovation"

The slide deck from my MEC presentation "Using exchange as a platform for innovation" has just been made available on   . I should have the GPX mail app posted up soon when i sort out the tile issue out. Any venture capitalist with money to loose on creating crazy/interesting/unique devices that connect to Exchange mailboxes please watch the videos in the presentation (got plenty of ideas in the pipeline) and let me know :) . (One typo in the PPX is I managed to create a new EWS operation "FindPerson" should have been FindPeople March was a long month)...

Oneliner Mailbox access with Powershell in Exchange Online using the oData preview

One of the things that was announced at MEC recently was Microsoft's Cloud first strategy with Exchange, which basically means that new feature will appear in Exchange Online first and then at some later date make their way into the OnPremise version of Exchange. One of these new cloud first features is the OData API for Mailbox data which is a REST based API for accessing mailbox data (as apposed to EWS which is a SOAP based API for accessing mailbox data). JSON and REST have become the standard for building WebAPI's over the past few years and every man and his dog (Google, Facebook,Twitter,Apple etc) are now using this so its exciting to see Exchange make this move. If you want to find out more about it and you have a couple of hours to watch some good video's I would check the following two presentations from MEC and which will give you a good grounding in both oD

Quota if Mailbox Size script for Exchange 2010,2013

If your playing around with different Mailbox quota values you might want to see what the usage of those quotas would be before you apply them to a Mailbox. This is a very simple Mailbox Size script for Remote Powershell to show you this with a funky console graph output (and a CSV report) eg So what the script does is the normal Get-Mailbox | Get-MailboxStatistics to get the TotalSize of the Mailbox in MB and compares that against a QuotaIf Value you feed into script in the above example that was 2000 MB. It then works out the current percentage used and the produces an Alt-ASCII graph and the above table. When you run this script you need to feed in the QuotaIf value eg .\quotaIf.ps1 2000 I've put a download of this script here and code itself looks like $QuotaIfVal  =  $args [0]   $Script :rptCollection  = @()   get-mailbox -ResultSize unlimited| Get-MailboxStatistics |  foreach -object{        $rptObj  =  ""  | Select MailboxName,TotalSize,Quo

Using EWS and AQS to check number of Unread in X days with Graph

It seems that you can never have too many ways of reading the number of Unread messages in a Inbox so here is another method. The following script uses two AQS queries to work out first the number of messages in the Inbox from a prescribed period eg the last 30 days and then the number of these that are then unread. It then works out the percentage of unread using of the two values and then creates a graph to display in the Console using Alt-ASCII characters which produces a pretty nifty output eg It also produces a CSV output eg AQS queries will work in Exchange 2010 and 2013 so this script should work okay in those environments as well as ExchangeOnline. I've created two versions of this script, the first version just reports on one user so you run it with the email of the users you want to report on and the number of days to query back. eg .\AQSUsr.ps1 30 the second version reports on all of the users in a CSV file and uses EWS

Pull Subscription Mailbox Item move tracking script MEC sample 2

This is the second of the Powershell script samples from my MEC talk last week. The idea behind this script is to track the movement of Items in a Mailbox between folders using Pull Notifications in EWS, you can read more about how Pull notifications work here  .  This script takes advantage of the fact that when you enable Single Item Recovery any deletes you make in a Mailbox (hard or soft) the Items aren't deleted rather moved to the Dumpster v2 RecoverableItems folders. So if you track all the move notification events you can track both the movement of Messages by rules, users or deletes. eg the results look like I've created two different versions of this script, the first version subscribes to all folders in a Mailbox and runs continuously against the Mailbox and does a GetEvents request every minute to retrieve the latest events from all folders in a Mailbox and then logs that to file. The second version just subscribes to the Inbox folder and saves the subscript

Export the GAL or Address list with EWS to Vcards in 2013 MEC sample 1

This is the first of the sample scripts I included in my MEC talk last Monday.  This script uses 3 of the new operations in EWS in Exchange 2013 to export all the address list entries of a particular Addresslist to individual Vcards (including the user photo) using just EWS. None of these operations are included in the EWS Managed API, so to use these operations I'm using some Raw SOAP and posting the EWS request using the standard httpwebrequest class in .Net and processing the response in XML. The FindPeople Operation is used firstly to page through all the entries in an Address list in groups of 100 entries at a time. To use this operation you first need to get the GUID for the address list you want to export and hard code this in the $ABGUID variable eg. $ABGUID = "6c118670-2f72-4213-944c-ab1e97d63f9b"; To get the GUID for your Global Address List you need to use the Get-GlobalAddressList Cmdlet
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.