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

Removes 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 which 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

Remove-CsRgsHolidaySet -Identity <RgsIdentity> [-Confirm [<SwitchParameter>]] [-Tenant <Nullable>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Rgs Identity

Unique identifier for the holiday set to be removed. The Identity of a holiday set consists of the location of the service where the holiday set is hosted plus a globally unique identifier (GUID). That means that a holiday set will have an Identity similar to this: service:ApplicationServer:atl-cs-001.litwareinc.com /1987d3c2-4544-489d-bbe3-59f79f530a83. Because GUIDs are difficult to remember, and to work with, the Examples section demonstrates alternate ways that you can identify the holiday set to be removed.

Force

Optional

Switch Parameter

Forces removal of the holiday set. If this parameter is present, the holiday set will be deleted without warning, even if it is used by an active workflow. If this parameter is not present then you will be asked to confirm the deletion of any holiday set currently assigned to an active workflow.

WhatIf

Optional

Switch Parameter

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

Confirm

Optional

Switch Parameter

This parameter is for testing purposes only.

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 whatever 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 Remove-CsRgsHolidaySet cmdlet enables administrators to remove Response Group holiday sets. By default, if you attempt to remove a holiday set currently assigned to an active workflow the cmdlet will pause and ask if you are sure you want to delete the workflow. The command will not continue, and the holiday set cannot be removed, until you respond to the prompt. To override this prompt, and to remove a holiday set even if it is currently being used by an active workflow, add the –Force parameter:

Get-CsRgsHolidaySet -Identity "service:ApplicationServer:atl-cs-001.litwareinc.com" -Name "2010 Holidays" | Remove-CsRgsHolidaySet –Force

Return Types

Remove-CsRgsHolidaySet deletes existing instances of the Microsoft.Rtc.Rgs.Management.WritableSettings.HolidaySet object.

Examples

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

Copy Code
Get-CsRgsHolidaySet -Identity "service:ApplicationServer:atl-cs-001.litwareinc.com " -Name "2010 Holidays" | Remove-CsRgsHolidaySet

The command shown in Example 1 removes the holiday set "2010 Holidays" from the service ApplicationServer:atl-cs-001.litwareinc.com. To do this, the command first calls Get-CsRgsHolidaySet along with two parameters: -Identity parameter (which specifies the location of the holiday set); and -Name (which specifies the name of the set). The returned object is then piped to Remove-CsRgsHolidaySet, which deletes the holiday set 2010 Holidays.

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

Copy Code
Get-CsRgsHolidaySet -Identity "service:ApplicationServer:atl-cs-001.litwareinc.com "  | Select-Object Identity -ExpandProperty Holidays | Where-Object {$_.Name -eq "New Year's Day"}  | Remove-CsRgsHolidaySet 

The preceding command deletes all the holiday sets on the service ApplicationServer:atl-cs-001.litwareinc.com that include the holiday New Year’s Day. In order to carry out this task, the command first uses Get-CsRgsHolidaySet to return a collection of all the holiday sets found on the service ApplicationServer:atl-cs-001.litwareinc.com. This collection is then piped to the Select-Object cmdlet, which does two things: selects the Identity property for each holiday set, and "expands" the value of the Holidays set. (When you expand a value you get at the properties of the underlying object; in the case of a holiday, that means properties like Name, StartDate, and EndDate). The selected information (holiday set Identity and holiday property values) is then piped to the Where-Object cmdlet, which picks out the sets that include a holiday where the Name is equal to (-eq) "New Year’s Day". The filtered collection of holiday sets in then piped to Remove-CsRgsHolidaySet, which deletes each holiday set that includes the holiday New Year’s Day.

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

Copy Code
Get-CsRgsHolidaySet -Identity "service:ApplicationServer:atl-cs-001.litwareinc.com"  | Where-Object {$_.Holidays.Count -eq 0} | Remove-CsRgsHolidaySet

The command shown in Example 3 deletes any holiday sets from the service ApplicationServer:atl-cs-001.litwareinc.com that do not have any holidays assigned to them. To do this, the command first calls Get-CsRgsHolidaySet to return a collection of all the holiday sets found on ApplicationServer:atl-cs-001.litwareinc.com. This collection is then piped to the Where-Object cmdlet, which selects only those holiday sets where the number of assigned holidays ($_.Holidays.Count) is equal to (-eq) 0. These holiday sets are then piped to, and deleted by, the Remove-CsRgsHolidaySet cmdlet.