[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Modifies the property values of an existing Response Group holiday set. A Response Group holiday set is a collection of holidays. For example, you might have one holiday set for a US-based queue (a set that might include a holiday for the Fourth of July) and a different set for a queue based in France. The latter queue might define a holiday for Bastille Day but not for the Fourth of July.

Syntax

Set-CsRgsHolidaySet -Instance <HolidaySet> [-Confirm [<SwitchParameter>]] [-Tenant <Nullable>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Instance

Required

HolidaySet object

Object reference to the Response Group holiday set to be modified. An object reference is typically retrieved by using the Get-CsRgsHolidaySet cmdlet and assigning the returned value to a variable; for example, this command returns an object reference to the queue Help Desk holiday set and stores that object reference in a variable named $x:

$x = Get-CsRgsHolidaySet -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk"

Force

Optional

Switch Parameter

Suppresses the display of any non-fatal error message that might arise when running the command.

WhatIf

Optional

Switch Parameter

Describes what would happen if you executed the command without actually executing the command.

Confirm

Optional

Switch Parameter

Prompts you for confirmation before executing the command.

Detailed Description

In order to provide callers with the best possible experience, the Response Group application makes it possible for you to clearly define when Response Group agents are available to answer calls and when they are not available to answer calls. With the Response Group application you can define business hours, which indicate the days of the week and hours of the day that agents are available to answer calls. For example, if your organization is typically open from 9:00 AM to 5:00 PM Monday through Friday then you would configure business hours that show that agents are available from 9:00 AM to 5:00 PM Monday through Friday (and, by extension, that agents are not available at, say, 8:00 PM on a Thursday or 2:30 PM on a Sunday).

Of course, in many organizations there are exceptions to the typical work week; for example, in the US an organization might be closed on Christmas Day or Thanksgiving Day. In order to accommodate these atypical closures, the Response Group application enables you to designate certain days as holidays: days when the organization would usually be open but, for some reason, is not. Individual holidays (created using the New-CsRgsHoliday cmdlet) are collected in holiday sets; for example, holidays for the US might collected in a holiday set named US_Holidays, while holidays for Japan might be collected in a holiday set named Japanese_Holidays. Once collected, holiday sets can then be assigned to Response Group workflows.

The Set-CsRgsHolidaySet cmdlet provides a way for you to modify an existing holiday set. (For the most part, this means adding holidays to or removing holidays from the set.) Set-CsRgsHolidaySet is not directly used to make changes to a holiday set. Instead, an object reference is created to an existing holiday set by using the Get-CsRgsHolidaySet cmdlet. (An object reference is simply a variable that, in this case, refers to an existing holiday set.) Changes to the set are made in memory, then the Set-CsRgsHolidaySet are used to write those changes to the actual holiday set. If you do not call Set-CsRgsHolidaySet then the changes you make will exist in memory only, and will disappear as soon as you close Windows PowerShell or delete the object reference.

Return Types

Set-CsRgsHolidaySet does not return any objects or values. Instead, the cmdlet modifies existing instances of the Microsoft.Rtc.Rgs.Management.WritableSettings.HolidaySet object.

Examples

-------------------------- Example 1 ------------------------

Copy Code
$x = New-CsRgsHoliday -StartDate "12/25/2010" -EndDate "12/25/2010" -Name "Christmas Day"
$y = Get-CsRgsHolidaySet -Identity "service:ApplicationServer:atl-cs-001.litwareinc.com" | Where-Object {$_.Name -eq "2010 Holidays"}
$y.Holidays.Add($x)
Set-CsRgsHolidaySet -Instance $y

The commands shown in Example 1 create a new holiday (Christmas Day) and then assign that holiday to an existing holiday set. To do this, the first command in the example uses the cmdlet New-CsRgsHoliday to create a new holiday (a "virtual" holiday that exists only in memory, and is stored in the variable $x). New-CsRgsHoliday uses three parameters: -StartDate, which represents the starting date for the holiday (12/25/2010); -EndDate, which represents the end date for the holiday (12/25/2010); and -Name, which represents the unique name to be given to the holiday.

After creating the new holiday, the second command uses Get-CsRgsHolidaySet to retrieve the holiday set "2010 Holidays" from the service ApplicationServer:atl-cs-001.litwareinc.com. This holiday set is stored in the variable $y.

Command 3 uses the Add method to add the new holiday ($x) to the virtual copy of the holiday set 2010 Holidays ($y). The final command then uses Set-CsRgsHolidaySet to write these changes (that is, to add the new holiday) to the service ApplicationServer:atl-cs-001.litwareinc.com.

-------------------------- Example 2 ------------------------

Copy Code
$x = Get-CsRgsHolidaySet -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name "2010 Holidays"
$y = $x.Holidays | Where-Object {$_.Name -eq "Christmas Day"}
$x.Holidays.Remove($y)
Set-CsRgsHolidaySet -Instance $x

The commands in Example 2 remove a holiday (in this case, Christmas day) from an existing holiday set. To accomplish this task, the first command in the example uses Get-CsRgsHolidaySet to retrieve the holiday set 2010 Holidays (-Name "2010 Holidays") from the service ApplicationServer:atl-cs-001.litwareinc.com. The retrieved data is stored in a variable named $x.

In the second command, the Holidays property from the retrieved holiday set is piped to the Where-Object cmdlet, which picks out the one holiday where the name property is equal to (-eq) "Christmas Day". That single holiday is stored in the variable $y.

After the Christmas Day holiday has been retrieved, command 3 uses the Remove method to remove the Christmas Day holiday ($y) from the holiday set 2010 Holidays ($x). The final command in the example then uses Set-CsRgsHolidaySet to write these changes (that is, to remove the Christmas Day holiday) from the actual 2010 Holidays holiday set on ApplicationServer:atl-cs-001.litwareinc.com.

-------------------------- Example 3 ------------------------

Copy Code
$x = Get-CsRgsHolidaySet -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name "2010 Holidays
$x.Holidays.Clear()
Set-CsRgsHolidaySet -Instance $x

The commands shown in Example 3 delete all the holidays from the holiday set 2010 Holidays found on the service ApplicationServer:atl-cs-001.litwareinc.com. To do this, the first step in the example uses Get-CsRgsHolidaySet to retrieve the appropriate holiday set from ApplicationServer:atl-cs-001.litwareinc.com. That holiday set is then stored in a variable named $x.

After the holiday set has been retrieved, the Clear method is used to remove all the values stored in the Holidays property. After this property has been cleared, the final command in the example uses the Set-CsRgsHolidaySet cmdlet to write these changes back to the holiday set 2010 Holidays.