Tuesday, 17 February 2015

Retrieving Hi-Res Photos from an Exchange Mailbox

As anyone running Lync 2013, Exchange 2013, and SharePoint 2013 may already know, Exchange provides a mechanism to store hi-res user profile photos in the Exchange mailbox, replacing the photos stored in the thumbnailPhoto AD attribute in many use cases.

Typically the Exchange Management Shell cmdlets Set-UserPhoto and Get-UserPhoto are used to store and retrieve the photos, and they can also be retrieved from Exchange using Exchange Web Services by visiting a URL like http://ex2013.example.com/EWS/Exchange.asmx/s/GetUserPhoto?email=ben.lye@example.com&size=HR648x648.

The user photo sizes are 48x48, 64x64, 96x96x 120x120, 240x240, 360x360, 504x504, and 648x648. When a photo is uploaded Exchange creates resized images up to the maximum the source image will support. For example, a 1024x1024 image will be uploaded in all resolutions, but a 420x420 image will be uploaded in resolutions up to 360x360. If a resolution higher than those stored is requested, the highest available will be returned.

I was recently troubleshooting an issue where the photos for a particular user were misbehaving, and one particular resolution photo was not updating correctly. I wanted to know exactly what data was stored in the Exchange mailbox for the user. I've created a PowerShell script which will use the Exchange Web Services API to retrieve the user photos directly from a mailbox in all resolutions actually stored, along with the date the photo was last updated.

Friday, 13 February 2015

Auditing Exchange Rooms for Double Bookings

I recently wrote a post over on the Exchange Server TechNet forum about how we have seen an increase in meeting room double bookings since upgrading from Exchange 2010 to Exchange 2013. I won't repeat it all here (you can read all the details over there), but the bottom line is that in certain situations Exchange 2013 accepts room double bookings.

We're working through the process of getting the Exchange Server product group to recognise that the new behaviour is not ideal, and one of the data points we needed was how many times we have had rooms double booked.

To get the information I came up with a PowerShell script which utilizes the Exchange Web Services API to query mailboxes and identify instances where rooms are double-booked.