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

Retrieves information about the Response Group Service business hour collections configured for use in your organization. Business hour collections 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

Get-CsRgsHoursOfBusiness -Identity <RgsIdentity> [-Name <String>] [-Tenant <Nullable>]

Parameters

Parameter Required Type Description

Identity

Required

Rgs identity

Represents either the Identity of the service where the business hours collection is hosted or the full Identity of the collection itself. If you specify the service Identity (for example, service:Redmond-ApplicationServer-1) then all the business hours collections hosted on that service will be returned. If you specify the Identity of the collection then only the specified business hours collection will be returned. Note that the Identity of a business hours collection consists of the service Identity followed by a GUID (globally unique identifier); for example: service:Redmond-ApplicationServer-1/1987d3c2-4544-489d-bbe3-59f79f530a83.

An alternate way to return a single business hours collection is to specify the service Identity, then include the –Name parameter followed by the collection name. That enables you to retrieve a specific business hours collection without having to know the GUID assigned to that collection.

Name

Optional

String

Unique name given to the business hours collection at the time the collection was created.

Force

Optional

Switch Parameter

Detailed Description

In order to provide callers with the best possible experience, the Response Group Service 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. (Nothing is more frustrating than calling a purported support line only the have the phone ring and ring and ring without ever being answered.) With the Response Group Service 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).

The Get-CsRgsHoursOfBusiness cmdlet provides a way for you to retrieve information about the business hour collections configured for use in your organization. Note that Get-CsRgsHoursOfBusiness can only retrieve data from a single instance of the Response Group Service at any one time. That means that, if you have instances of the service son both Redmond-ApplicationServer-1 and Dublin-ApplicationServer-1, you will need to call the cmdlet twice in order to return business hours data from each instance of the service.

Return Types

Returns instances of the Microsoft.Rtc.Rgs.Management.WriteableSettings.BusinessHours object.

Examples

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

Copy Code
Get-CsRgsHoursOfBusiness -Identity "service:Redmond-ApplicationServer-1"

The command shown in Example 1 returns all the business hours collections configured for use on Redmond-ApplicationServer-1.

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

Copy Code
Get-CsRgsHoursOfBusiness -Identity "service:Redmond-ApplicationServer-1" -Name "Help Desk Business Hours"

The preceding command returns a single collection of business hours from Redmond-ApplicationServer-1: the collection with the Name Help Desk Business Hours.

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

Copy Code
Get-CsRgsHoursOfBusiness -Identity "service:Redmond-ApplicationServer-1" | Where-Object {$_.SundayTimeRange1 -ne $Null -or $_.SundayTimeRange2 -ne $Null}

The preceding command returns all the business hours collections that have business hours configured for Sundays. To do this, the command first calls Get-CsRgsHoursOfBusiness to return all the business hour collections found on Redmond-ApplicationServer-1. These collections are then piped to the Where-Object cmdlet, which selects only those items where one of the following two criteria is true: the SundayTimeRange1 property is not equal to (-ne) a null value ($Null), or the SundayTimeRange2 property is not equal to a null value. (If a time range property is not null, then that means business hours have been configured for that property.)

-------------------------- Example 4 ------------------------

Copy Code
Get-CsRgsHoursOfBusiness -Identity "service:Redmond-ApplicationServer-1" | Where-Object {$_.MondayTimeRange1.OpenTime -le "08:00:00"}

The command shown in Example 4 returns all the business hour collections from Redmond-Application-Server-1 where the opening time for the MondayTimeRange1 property earlier than 8:00 AM. In order to do this, the command first uses Get-CsRgsHoursOfBusiness to return all the business hour collections from Redmond-ApplicationServer-1. This data is then piped to the Where-Object cmdlet, which selects only those collections where the value of the MondayTimeRange.OpenTime property is less than or equal to (-le) 8:00 AM (08:00:00).

-------------------------- Example 5 ------------------------

Copy Code
Get-CsRgsHoursOfBusiness -Identity "service:Redmond-ApplicationServer-1" | Where-Object {$_.Private -eq $True}

The command shown in Example 5 returns all the private business hour collections (that is, collections that cannot be shared among workflows). To carry out this task, the command first uses Get-CsRgsHoursOfBusiness to returns all the business hour collections found on Redmond-ApplicationServer-1. This data is then piped to the Where-Object cmdlet, which picks out only those collections where the Private property is equal to (-eq) True ($True).