TeamsOnlineSchedule¶
Parameters¶
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Name | Key | String | The unique friendly name of the schedule. | |
| Type | Write | String | The type of the schedule. A weekly recurrent schedule defines business or after hours, a fixed schedule defines holidays. The type cannot change once the schedule exists. Required when the schedule is created. | WeeklyRecurrence, Fixed |
| MondayHours | Write | MSFT_TeamsOnlineScheduleTimeRange[] | The time ranges of a weekly recurrent schedule on Mondays. | |
| TuesdayHours | Write | MSFT_TeamsOnlineScheduleTimeRange[] | The time ranges of a weekly recurrent schedule on Tuesdays. | |
| WednesdayHours | Write | MSFT_TeamsOnlineScheduleTimeRange[] | The time ranges of a weekly recurrent schedule on Wednesdays. | |
| ThursdayHours | Write | MSFT_TeamsOnlineScheduleTimeRange[] | The time ranges of a weekly recurrent schedule on Thursdays. | |
| FridayHours | Write | MSFT_TeamsOnlineScheduleTimeRange[] | The time ranges of a weekly recurrent schedule on Fridays. | |
| SaturdayHours | Write | MSFT_TeamsOnlineScheduleTimeRange[] | The time ranges of a weekly recurrent schedule on Saturdays. | |
| SundayHours | Write | MSFT_TeamsOnlineScheduleTimeRange[] | The time ranges of a weekly recurrent schedule on Sundays. | |
| Complement | Write | Boolean | Indicates whether a weekly recurrent schedule is in effect outside of its time ranges instead of inside them. | |
| DateTimeRanges | Write | MSFT_TeamsOnlineScheduleFixedTimeRange[] | The date time ranges of a fixed schedule. | |
| Ensure | Write | String | Specify if the schedule should exist. | Present, Absent |
| Credential | Write | PSCredential | Credentials of the Teams Admin | |
| ApplicationId | Write | String | Id of the Entra ID application to authenticate with. | |
| TenantId | Write | String | Id of the Entra ID tenant used for authentication. | |
| CertificateThumbprint | Write | String | Thumbprint of the Entra ID application's authentication certificate to use for authentication. | |
| ManagedIdentity | Write | Boolean | Managed ID being used for authentication. | |
| AccessTokens | Write | String[] | Access token used for authentication. |
Embedded Instances¶
MSFT_TeamsOnlineScheduleTimeRange¶
Parameters¶
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Start | Required | String | The start of the time range in the format HH:mm, for example 09:00. | |
| End | Required | String | The end of the time range in the format HH:mm, for example 17:00. Use 1.00:00 for the end of the day. |
MSFT_TeamsOnlineScheduleFixedTimeRange¶
Parameters¶
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Start | Required | String | The start of the date time range in the format d/M/yyyy H:mm, for example 24/12/2026 0:00. | |
| End | Write | String | The end of the date time range in the format d/M/yyyy H:mm, for example 26/12/2026 0:00. |
Description¶
This resource configures a Teams schedule that auto attendants use for business hours, after hours and holidays.
Permissions¶
Microsoft Entra ID roles¶
This resource requires the following Microsoft Entra ID roles:
- Read
- Teams Reader
- Update
- Teams Administrator
Examples¶
Example 1¶
This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.
Configuration Example
{
param
(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
Node localhost
{
TeamsOnlineSchedule 'TeamsOnlineSchedule-Example'
{
Name = "Contoso Business Hours"
Type = "WeeklyRecurrence"
MondayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
TuesdayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
WednesdayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
ThursdayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
FridayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
Complement = $false
Ensure = "Present"
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
}
}
}
Example 2¶
This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.
Configuration Example
{
param
(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
Node localhost
{
TeamsOnlineSchedule 'TeamsOnlineSchedule-Example'
{
Name = "Contoso Business Hours"
Type = "WeeklyRecurrence"
MondayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
TuesdayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
WednesdayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
ThursdayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "09:00"
End = "17:00"
}
)
FridayHours = @(
MSFT_TeamsOnlineScheduleTimeRange{
Start = "08:00" # Updated Property
End = "16:00" # Updated Property
}
)
Complement = $false
Ensure = "Present"
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
}
}
}
Example 3¶
This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.
Configuration Example
{
param
(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
Node localhost
{
TeamsOnlineSchedule 'TeamsOnlineSchedule-Example'
{
Name = "Contoso Business Hours"
Ensure = "Absent"
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
}
}
}