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

Configures an existing set of Response Group business hours. Business hour sets are used to indicate the days of the week and the times of day when Response Group agents are typically available to answer phone calls.

Syntax

Set-CsRgsHoursOfBusiness -Instance <BusinessHours> [-Confirm [<SwitchParameter>]] [-Tenant <Nullable>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Instance

Required

BusinessHours object

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

$x = Get-CsRgsHoursOfBusiness -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

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; these hours 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).

Business hour sets are created using the New-CsRgsHoursOfBusiness cmdlet. After these sets have been created, they can be modified using the Set-CsRgsHoursOfBusiness cmdlet. Typically, this will mean changing the business hours for one or more days of the week. For example, if the help desk used to stay open until 5:00 PM but on Fridays but now stays open until 7:00 PM on Fridays then you will need to modify the business hours for Friday. If the help desk used to be open on Saturdays but is now closed on Saturdays, you will likewise need to modify the Saturday business hours. (To indicate that a Response Group workflow is not available on a particular day simply set the business hours for that day to a null value: $Null.)

When configuring business hours within a business hours set keep in mind that each day of the week has both a TimeRange1 and a TimeRange2 property. If your help desk is open from 8:00 AM to 5:00 PM you only need to assign values to the appropriate TimeRange1 property. However, suppose the help desk is open from 8:00 AM to 2:00 PM, then open again from 5:00 PM until 11:00 PM. In that case you need to assign the time range 8:00 AM to 2:00 PM to TimeRange1 and 5:00 PM to 11:00 PM to TimeRange2.

Note that Set-CsRgsHoursOfBusiness does not directly modify a business hours set. Instead, you must use Get-CsRgsHoursOfBusiness to create an object reference to the set to be modified. (When you create an object reference you simply retrieve a copy of the business hours set and then store that copy in a variable.) After you have created an object reference you modify the properties of that in-memory-only object. When your modifications are complete, you then use Set-CsRgsHoursOfBusiness to write those changes to the actual business hours set.

Return Types

Modifies existing instances of the Microsoft.Rtc.Rgs.Management.WriteableSettings.BusinessHours object.

Examples

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

Copy Code
$weekend = New-CsRgsTimeRange -Name "Weekend Hours" -OpenTime "12:00" -CloseTime "17:00"

$x = Get-CsRgsHoursOfBusiness -Identity "service:ApplicationServer:atl-cs-001.litwareinc.com" -Name "Help Desk Business Hours"
$x.SaturdayTimeRange1 = $weekend
$x.SundayTimeRange1 = $weekend
Set-CsRgsHoursOfBusiness -Instance $x

The preceding example shows you can assign a new time range value to the SaturdayTimeRange1 and SundayTimeRange1 properties of the business hours set Help Desk Business Hours. To do this, the first command in the example uses New-CsRgsTimeRange to create a new time range object (Weekend Hours) with an opening time of 12:00 PM (12:00) and a closing time of 5:00 PM (17:00). This object is stored in a variable named $weekend.

The next command creates an object reference ($x) to the Help Desk Business Hours business hours set on ApplicationServer:atl-cs-001.litwareinc.com. When that command is finished commands 3 and 4 are used to set the SaturdayTimeRange1 and SundayTimeRange1 properties to the time range value stored in $weekend. Finally, the fourth command in the example then uses Set-CsRgsHoursOfBusiness to write these changes back to the actual business hours set.

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

Copy Code
$x = Get-CsRgsHoursOfBusiness -Identity "service:ApplicationServer:atl-cs-001.litwareinc.com " -Name "Help Desk Business Hours"
$x.SaturdayTimeRange1 = $Null

Set-CsRgsHoursOfBusiness -Instance $x

The commands shown in Example 2 delete the value configured for the SaturdayTimeRange1 property in the business hours set Help Desk Business Hours. To do, this, first command creates an object reference ($x) to the Help Desk Business Hours business hours set on ApplicationServer:atl-cs-001.litwareinc.com. After the object reference has been created, the second command sets the SaturdayTimeRange1 property to a null value ($Null); this effectively erases any value previously assigned to SaturdayTimeRange1. The final command in the example then uses Set-CsRgsHoursOfBusiness to write these changes back to the actual business hours set.