Mar 28

Lync Holiday Sets for Canada + British Columbia

The below powershell code has all of the major holidays for Canada and British Columbia through 2015. If your business isn’t in BC, then simply delete the $k variable in the New-CsRgsHolidaySet command. Replace <poolname> below with either the name of your pool or the name of your standard edition server.

$a = New-CsRgsHoliday -Name “New Year’s Day” -StartDate “1/1/2012” -EndDate “1/2/2012”
$b = New-CsRgsHoliday -Name “Good Friday” -StartDate “4/6/2012” -EndDate “4/22/2012”
$c = New-CsRgsHoliday -Name “Easter Monday” -StartDate “4/9/2012” -EndDate “4/9/2012”
$d = New-CsRgsHoliday -Name “Victoria Day” -StartDate “5/21/2012” -EndDate “5/21/2012”
$e = New-CsRgsHoliday -Name “Canada Day” -StartDate “7/1/2012” -EndDate “7/1/2012”
$f = New-CsRgsHoliday -Name “Labour Day” -StartDate “9/3/2012” -EndDate “9/3/2012”
$g = New-CsRgsHoliday -Name “Thanksgiving Day” -StartDate “10/8/2012” -EndDate “10/8/2012”
$h = New-CsRgsHoliday -Name “Remembrance Day” -StartDate “11/11/2012” -EndDate “11/12/2012”
$i = New-CsRgsHoliday -Name “Christmas Day” -StartDate “12/25/2012” -EndDate “12/25/2012”
$j = New-CsRgsHoliday -Name “Boxing Day” -StartDate “12/26/2012” -EndDate “12/26/2012”
$k = New-CsRgsHoliday -Name “British Columbia Day” -StartDate “8/6/2012” -EndDate “8/6/2012”
New-CsRgsHolidaySet -Parent “service:ApplicationServer:<poolname>” -name “2012 CA Holidays” – holidaylist ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k)

$a = New-CsRgsHoliday -Name “New Year’s Day” -StartDate “1/1/2013” -EndDate “1/1/2013”
$b = New-CsRgsHoliday -Name “Good Friday” -StartDate “3/29/2013” -EndDate “3/29/2013”
$c = New-CsRgsHoliday -Name “Easter Monday” -StartDate “4/1/2013” -EndDate “4/1/2013”
$d = New-CsRgsHoliday -Name “Victoria Day” -StartDate “5/20/2013” -EndDate “5/20/2013”
$e = New-CsRgsHoliday -Name “Canada Day” -StartDate “7/1/2013” -EndDate “7/1/2013”
$f = New-CsRgsHoliday -Name “Labour Day” -StartDate “9/2/2013” -EndDate “9/2/2013”
$g = New-CsRgsHoliday -Name “Thanksgiving Day” -StartDate “10/14/2013” -EndDate “10/14/2013”
$h = New-CsRgsHoliday -Name “Remembrance Day” -StartDate “11/11/2013” -EndDate “11/11/2013”
$i = New-CsRgsHoliday -Name “Christmas Day” -StartDate “12/25/2013” -EndDate “12/25/2013”
$j = New-CsRgsHoliday -Name “Boxing Day” -StartDate “12/26/2013” -EndDate “12/26/2013”
$k = New-CsRgsHoliday -Name “British Columbia Day” -StartDate “8/5/2013” -EndDate “8/5/2013”
New-CsRgsHolidaySet -Parent “service:ApplicationServer:<poolname>” -name “2013 CA Holidays” – holidaylist ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k)

$a = New-CsRgsHoliday -Name “New Year’s Day” -StartDate “1/1/2014” -EndDate “1/1/2014”
$b = New-CsRgsHoliday -Name “Good Friday” -StartDate “4/18/2014” -EndDate “4/18/2014”
$c = New-CsRgsHoliday -Name “Easter Monday” -StartDate “4/21/2014” -EndDate “4/21/2014”
$d = New-CsRgsHoliday -Name “Victoria Day” -StartDate “5/19/2014” -EndDate “5/19/2014”
$e = New-CsRgsHoliday -Name “Canada Day” -StartDate “7/1/2014” -EndDate “7/1/2014”
$f = New-CsRgsHoliday -Name “Labour Day” -StartDate “9/1/2014” -EndDate “9/1/2014”
$g = New-CsRgsHoliday -Name “Thanksgiving Day” -StartDate “10/13/2014” -EndDate “10/13/2014”
$h = New-CsRgsHoliday -Name “Remembrance Day” -StartDate “11/11/2014” -EndDate “11/11/2014”
$i = New-CsRgsHoliday -Name “Christmas Day” -StartDate “12/25/2014” -EndDate “12/25/2014”
$j = New-CsRgsHoliday -Name “Boxing Day” -StartDate “12/26/2014” -EndDate “12/26/2014”
$k = New-CsRgsHoliday -Name “British Columbia Day” -StartDate “8/4/2014” -EndDate “8/4/2014”
New-CsRgsHolidaySet -Parent “service:ApplicationServer:<poolname>” -name “2014 CA Holidays” – holidaylist ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k)

$a = New-CsRgsHoliday -Name “New Year’s Day” -StartDate “1/1/2015” -EndDate “1/1/2015”
$b = New-CsRgsHoliday -Name “Good Friday” -StartDate “4/3/2015” -EndDate “4/3/2015”
$c = New-CsRgsHoliday -Name “Easter Monday” -StartDate “4/6/2015” -EndDate “4/6/2015”
$d = New-CsRgsHoliday -Name “Victoria Day” -StartDate “5/18/2015” -EndDate “5/18/2015”
$e = New-CsRgsHoliday -Name “Canada Day” -StartDate “7/1/2015” -EndDate “7/1/2015”
$f = New-CsRgsHoliday -Name “Labour Day” -StartDate “9/7/2015” -EndDate “9/7/2015”
$g = New-CsRgsHoliday -Name “Thanksgiving Day” -StartDate “10/12/2015” -EndDate “10/12/2015”
$h = New-CsRgsHoliday -Name “Remembrance Day” -StartDate “11/11/2015” -EndDate “11/11/2015”
$i = New-CsRgsHoliday -Name “Christmas Day” -StartDate “12/25/2015” -EndDate “12/25/2015”
$j = New-CsRgsHoliday -Name “Boxing Day” -StartDate “12/26/2015” -EndDate “12/28/2015”
$k = New-CsRgsHoliday -Name “British Columbia Day” -StartDate “8/3/2015” -EndDate “8/3/2015”
New-CsRgsHolidaySet -Parent “service:ApplicationServer:<poolname>” -name “2015 CA Holidays” – holidaylist ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k)

To apply these holiday sets to an existing Response Group Service, run the following for each year:

$HolidayHours = Get-CsRgsHolidaySet “service:ApplicationServer:<poolname>” -Name “<Name of Holiday Set>”

$y = Get-CsRgsWorkflow <poolname> -Name “<Name of Response Group>”

$y.HolidaySetIDList.Add($HolidayHours.Identity)

Set-CsRgsWorkflow -Instance $y

1 comment

  1. Hi there, I enjoy reading through your article. I like to write a little comment
    to support you.
    Colleen

Leave a Reply

Your email address will not be published.

%d bloggers like this: