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.