Wednesday, 13 January 2016

Skype for Business, SQL Server, and VMware

If you have deployed a virtualized Lync Server 2013 or Skype for Business infrastructure, and have followed the best practices, your Lync or Skype VMs will no doubt have multiple CPU cores.

If you have done this on VMware, and you let the VMware provisioning wizard automatically assign the CPUs, you may have a problem.

By default VMware will assign multiple CPU cores as multiple virtual CPU sockets, each with a single virtual core. This means that in an eight core server you have eight sockets. This fine for Lync or Skype, but represents a problem for the SQL Express installation that every front end server has, or indeed the SQL Server Standard installations you might be using for your back-end databases.

SQL Server Express is limited to "the lesser of 1 socket or 4 cores", which means that in the default VMware configuration SQL Express gets 1 core (because 1 socket has 1 core).

SQL Server Standard Edition is limited to "the lesser of 4 sockets or 16 cores", which means that if you have more than 4 virtual sockets, but only 1 virtual core per socket, SQL gets only 4 cores.

In order to give SQL Express access to more CPU resources you need to alter the virtual CPU allocation to put have fewer virtual sockets, with multiple virtual cores per socket.

To look for this issue in my VMware-based Skype for Business Environment I put together a brief script. The purpose is to report out the CPU configuration of all the servers which host a local management store replica (these servers have a local SQL Express instance), and all the back-end database servers.

Note that the script will fail to connect to Edge servers, and those should be checked manually.

Thursday, 29 October 2015

Generating Lync/Skype Option 120 Values for DHCP Servers

If your Lync or Skype for Business deployment includes Lync Phone Edition devices, you are probably familiar with the DHCP configuration work necessary to get phones to find the Lync or Skype pool for registration and log in.

The standard way is to use DHCPUtil.exe to give you all the values you need for your DHCP server settings. This works, but can be tedious if you have a lot of servers to configure - a PowerShell script would be better.

I recently needed to reconfigure our DHCP servers for a number of Lync server changes, and wanted a quick way to generate Option 120 values. After a little bit of research I found out how the Option 120 value is constructed. There is a nice write-up on 'Chris and Robin's Technology Blog', here.

So now that I know what the finished value looks like, I could write the PowerShell script. It turned out to be pretty simple. The only extra step I added was to include the option to split the string up into characters separated by a colon, as that is the format our non-Microsoft DHCP server requires.

Thursday, 16 July 2015

Getting UM Voicemail Greetings in Exchange 2013

Back in 2012 I posted a script to audit Exchange UM greetings.  The script worked nicely for Exchange 2010 but, because of some cmdlet changes, it no longer works in Exchange 2013.  I still needed to be able to audit UM greetings, but had to come up with a new method to do it.

To solve the problem I found a way to use the Exchange Web Services Managed API to return the information I needed from the mailbox.

I wrote a new script which used the EWS API to look inside the mailbox and search for the special hidden messages which contain the UM greetings.  As an added bonus, the new script can also download the greeting audio and save it to disk.

Tuesday, 9 June 2015

Uploading an Exchange UM Voicemail Greeting

A colleague recently asked if I knew of a way to upload an audio file as an Exchange UM voice-mail greeting message - you can do this through Exchange for UM attendants, but not mailboxes. The background of the request is that we use Exchange UM for handling inbound calls, and calls which cannot be routed to a team or queue go to a team mailbox rather than an individuals. We have around 80 of these, and were looking at changing their greetings. Having to manually dial into each one and record the new greeting seemed cumbersome.

I had some experience with programmatically retrieving voice-mail greeting recordings from Exchange UM, so I guess that this might be possible too. It turns out that with the Exchange Web Services Managed API it is possible, and works fairly well.

The main caveat with this approach is that you need to be mindful of the size and quality of the WAV file you are uploading. I found that it worked well with a 16KHz, mono, audio file. I tested files up to about 350KB. With some higher-rate files the upload succeeded, but when calling the mailbox Exchange announced that 'a system error had occurred'. This problem could be resolved by re-recording another greeting over the phone.

The script does not support other files types, such as mp3, etc.

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

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.

Wednesday, 25 September 2013

Joiny - Joining Lync Meetings without Outlook

A pain we felt when we rolled out Lync 2010 was that there was no easy way to join a pre-scheduled Lync online  meeting without going to Outlook or OWA and clicking the Join Meeting hyperlink.  During our implementation we gave this feedback to the Microsoft Lync team, and eventually we were happy to see the feature added to Lync 2013 in the July Lync 2013 update (MS13-054).

However, in the background I had been working on a Lync add-in to give this functionality to Lync 2010 and 2013 clients.  I got the add-in 'finished' at almost the same time the July update was announced.

While the tool is no longer much use if you have an up-to-date Lync 2013 client, it can still be useful in Lync 2010 - I find it particularly useful in meeting room scenarios, where it is painful to have to start Outlook or OWA to get into the meeting (you may not want to open your e-mail on a PC that is connected to a projector).

So, I give you Joiny.