Microsoft Lync Response Group UK Holiday Set

I’ve recently migrated our existing Microsoft Office Communication Server (OCS) 2007 R2 to Microsoft Lync Server 2010. I used to like OCS a lot and my first impressions of Lync are, well I love it!

I’ve set up enterprise voice on Lync and have configured it to route calls through a Trixbox (Asterisk-based software PBX) virtual machine.

Speaking of virtual machines, the Lync (standard edition) front end server and the Lync edge server are Hyper-V virtual machines.

I’ll move onto the purpose of this post now…

Whilst setting up the Lync Response Groups I noticed that the standard holiday lists are empty by default and must be entered via the Lync Server Management Shell (powershell).

You’ll need to use New-CsRgsHoliday command to create the holidays then add them to a “Holiday Set” using the New-CsRgsHolidaySet command. Here’s the TechNet page details this.

To save you some time here are the commands to create all the UK public holidays for 2011 and input them into a holiday set called “2011 Holidays”. (updated due to John’s comment below)

$a = New-CsRgsHoliday -Name "New Year's Day" -StartDate "1/1/2011" -EndDate "1/3/2011" $b = New-CsRgsHoliday -Name "Good Friday" -StartDate "22/4/2011" -EndDate "23/4/2011" $c = New-CsRgsHoliday -Name "Easter Monday" -StartDate "25/4/2011" -EndDate "26/4/2011" $d = New-CsRgsHoliday -Name "Royal Wedding Bank Holiday" -StartDate "29/4/2011" -EndDate "30/4/2011" $e = New-CsRgsHoliday -Name "Early May Bank Holiday" -StartDate "2/5/2011" -EndDate "3/5/2011" $f = New-CsRgsHoliday -Name "Spring Bank Holiday" -StartDate "30/5/2011" -EndDate "31/5/2011" $g = New-CsRgsHoliday -Name "Summer Bank Holiday" -StartDate "29/8/2011" -EndDate "30/8/2011" $h = New-CsRgsHoliday -Name "Boxing Day" -StartDate "26/12/2011" -EndDate "27/12/2011" $i = New-CsRgsHoliday -Name "Christmas Day Holiday" -StartDate "27/12/2011" -EndDate "28/12/2011" New-CsRgsHolidaySet -Parent "applicationserver:<your lync mediation server name>" -name "2011 Holidays" -holidaylist ($a, $b, $c, $d, $e, $f, $g, $h, $i)

Just modify the last line and replace <your lync mediation server name> with the FQDN of your Lync server.

Here’s the same for 2012:

$a = New-CsRgsHoliday -Name "New Year's Day 2012" -StartDate "2/1/2012" -EndDate "3/2/2012"
$b = New-CsRgsHoliday -Name "Good Friday 2012" -StartDate "6/4/2012" -EndDate "7/4/2012"
$c = New-CsRgsHoliday -Name "Easter Monday 2012" -StartDate "9/4/2012" -EndDate "10/4/2012"
$d = New-CsRgsHoliday -Name "Early May Bank Holiday 2012" -StartDate "7/5/2012" -EndDate "8/5/2012"
$e = New-CsRgsHoliday -Name "Spring Bank Holiday 2012" -StartDate "4/6/2012" -EndDate "5/6/2012"
$f = New-CsRgsHoliday -Name "Diamond Jubilee Holiday 2012" -StartDate "5/6/2012" -EndDate "6/6/2012"
$g = New-CsRgsHoliday -Name "Summer Bank Holiday 2012" -StartDate "27/8/2012" -EndDate "28/8/2012"
$h = New-CsRgsHoliday -Name "Christmas Day 2012" -StartDate "25/12/2012" -EndDate "26/12/2012"
$i = New-CsRgsHoliday -Name "Boxing Day 2012" -StartDate "26/12/2012" -EndDate "27/12/2012"
New-CsRgsHolidaySet -Parent "applicationserver:<your lync server name>" -name "2012 Holidays" -holidaylist ($a, $b, $c, $d, $e, $f, $g, $h, $i)

Just copy the whole lot into the Lync Server Management Shell and Bob’s your uncle. Now when you create a hunt or interactive response group you can choose the enable 2011 and 2012 Holidays.

Advertisements

4 thoughts on “Microsoft Lync Response Group UK Holiday Set

  1. Hi, just thought I would mention that there is a slight error in the New Year’s Day 2012 holiday above, in that it starts on 2nd Jan 2012 and ends on 3rd Feb 2012! I know this as we just found out at work when our response groups were putting everything to voicemail! That’s what you get for copying and pasting without checking 🙂

  2. My brother recommended I would possibly like this blog. He was once totally right. This post actually made my day. You cann’t consider just how so much time I had spent for this information! Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s