Bewerken

Delen via


New-CsOnlineDateTimeRange

Use the New-CsOnlineDateTimeRange cmdlet to create a new date-time range.

Syntax

New-CsOnlineDateTimeRange
   -Start <String>
   [-End <String>]
   [-Tenant <Guid>]
   [<CommonParameters>]

Description

The New-CsOnlineDateTimeRange cmdlet creates a new date-time range to be used with the Organizational Auto Attendant (OAA) service. Date time ranges are used to form schedules.

NOTE:

  • The start bound of the range must be less than its end bound.
  • The time part of the range must be aligned with 30/60-minutes boundaries.
  • A date time range bound can only be input in the following formats:
    • "d/m/yyyy H:mm"
    • "d/m/yyyy" (the time component of the date-time range is set to 00:00)

Examples

Example 1

$dtr = New-CsOnlineDateTimeRange -Start "1/1/2017"

This example creates a date-time range for spanning from January 1, 2017 12AM to January 2, 2017 12AM.

Example 2

$dtr = New-CsOnlineDateTimeRange -Start "24/12/2017 09:00" -End "27/12/2017 00:00"

This example creates a date-time range spanning from December 24, 2017 9AM to December 27, 2017 12AM.

Parameters

-End

The End parameter represents the end bound of the date-time range.

If not present, the end bound of the date time range is set to 00:00 of the day after the start date.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-Start

The Start parameter represents the start bound of the date-time range.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-Tenant

Type:System.Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

Inputs

None

Outputs

Microsoft.Rtc.Management.Hosted.Online.Models.DateTimeRange