Creates a new Response Group holiday. In the Response Group application, a holiday represents a day when the agents assigned to a queue, who would typically be working that day, will not be working after all and will not be available to answer calls. For example, if US-based workers are given Thanksgiving Day off, then a holiday would be configured for November 24, 2011.
Syntax
New-CsRgsHoliday -EndDate <Nullable> -StartDate <Nullable> [-Name <String>] |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Name |
Required |
String |
Unique name used to differentiate the holiday set from other holiday sets. For example, holidays observed in the US might be gathered in a holiday set named "US_Holidays". |
StartDate |
Required |
DateTime |
Starting date for the holiday. The format for the starting date will depend on your language and regional settings. For example, in the US a starting date of July 4, 2011 would be formatted like this: -StartDate "7/4/2011 12:00 AM", indicating that the holidat begins at 12:00 AM on July 4, 2011. |
EndDate |
Required |
DateTime |
Ending date for the holiday. The format for the ending date will depend on your language and regional settings. For example, in the US an ending date of July 4, 2011 would be formatted like this: -EndDate "7/5/2011 12:00 AM", meaning that the holiday ends at 12:00 AM on July 5, 2011. |
Detailed Description
The Response Group application uses business hour collections to indicate the days of the week, and the times of day, when agents are typically available to answer phone calls. For example, suppose your help desk is usually staffed from 7:00 AM to 7:00 PM every Monday. In that case, you would create a business hours collection for the help desk, and configure an opening time of 7:00 AM and a closing time of 7:00 PM for the typical Monday.
However, there might be exceptions to the rule that the help desk is staffed every Monday from 7:00 AM to 7:00 PM. For example, in the US July 4th is a national holiday; consequently, your help desk personnel might not be available on July 4th. In order to account for the fact that the help desk will not be working on Monday, July 4, 2011 you need to create a holiday for that date and add it to the help desk holiday set.
To create a holiday you need to use the New-CsRgsHoliday cmdlet. (Note that a "holiday" doesn’t have to involve some sort of celebration or festivities; instead, a holiday is simply a day when agents will not be available to answer the phone.) New-CsRgsHoliday does not directly add a holiday to a holiday set. Instead, the cmdlet creates a new holiday that exists in memory only. Because of that you must create an object reference (such $x) that points to this in-memory instance. After the holiday has been created in memory, you then use the Get-CsRgsHolidaySet cmdlet to retrieve the appropriate holiday set and the Set-CsRgsHolidaySet cmdlet to add the new holiday to that set.
Although a holiday set can (and typically does) hold multiple holidays, these holidays must be added to the set one holiday at a time.
Return Types
New-CsRgsHoliday creates new instances of the Microsoft.Rtc.Rgs.Management.WritableSettings.Holiday object.
Examples
-------------------------- Example 1 ------------------------
Copy Code | |
---|---|
$christmasDay = New-CsRgsHoliday -StartDate "12/25/2010 12:00 AM" -EndDate "12/26/2010 12:00 AM" -Name "Christmas Day" $y = Get-CsRgsHolidaySet -Identity "service:ApplicationServer:atl-cs-001.litwareinc.com" -Name "2010 Holidays" $y.Holidays.Add($christmasDay) Set-CsRgsHolidaySet -Instance $y |
The commands shown in Example 1 show how you can 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 $christmasDay. New-CsRgsHoliday uses three parameters: -StartDate, which represents the starting date for the holiday (12/25/2010 12:00 AM); -EndDate, which represents the end date for the holiday (12/26/2010 12:00 AM); 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 ($christmasDay) to the virtual copy of the holiday set 2010 Holidays ($y). The final command then uses Set-CsRgsHolidaySet to write the changes (that is, to add the new holiday) to the service ApplicationServer:atl-cs-001.litwareinc.com.