Skip to content

Commit a35d5e0

Browse files
Merge pull request #6405 from FabienTschanz/feat/teamseventpolicy-new-properties
Add new properties to Teams Events Policy
2 parents fdaef2c + 6a64eee commit a35d5e0

File tree

5 files changed

+235
-71
lines changed

5 files changed

+235
-71
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
* SCAutoSensitivityLabelRule
2424
* Updated supported values for `Workload` property.
2525
FIXES [#4617](https://github.com/microsoft/Microsoft365DSC/issues/4617)
26+
* TeamsEventsPolicy
27+
* Added 7 new properties.
28+
FIXES [#6403](https://github.com/microsoft/Microsoft365DSC/issues/6403)
2629
* DEPENDENCIES
2730
* Updated ReverseDSC to version 2.0.0.29.
2831

Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.psm1

Lines changed: 112 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ function Get-TargetResource
1919
[ValidateSet('Enabled', 'Disabled')]
2020
$AllowWebinars,
2121

22+
[Parameter()]
23+
[System.String]
24+
[ValidateSet('Enabled', 'Disabled')]
25+
$BroadcastPremiumApps,
26+
2227
[Parameter()]
2328
[System.String]
2429
[ValidateSet('Everyone', 'EveryoneInCompanyExcludingGuests')]
@@ -53,6 +58,36 @@ function Get-TargetResource
5358
[System.String]
5459
$AllowedTownhallTypesForRecordingPublish,
5560

61+
[Parameter()]
62+
[System.String]
63+
[ValidateSet('Enabled', 'Disabled')]
64+
$ImmersiveEvents,
65+
66+
[Parameter()]
67+
[System.String]
68+
[ValidateSet('Enabled', 'Disabled')]
69+
$RecordingForTownhall,
70+
71+
[Parameter()]
72+
[System.String]
73+
[ValidateSet('Enabled', 'Disabled')]
74+
$RecordingForWebinar,
75+
76+
[Parameter()]
77+
[System.String]
78+
[ValidateSet('Everyone', 'EveryoneInOrganizationAndGuests')]
79+
$TownhallEventAttendeeAccess,
80+
81+
[Parameter()]
82+
[System.String]
83+
[ValidateSet('Enabled', 'Disabled')]
84+
$TranscriptionForTownhall,
85+
86+
[Parameter()]
87+
[System.String]
88+
[ValidateSet('Enabled', 'Disabled')]
89+
$TranscriptionForWebinar,
90+
5691
[Parameter()]
5792
[ValidateSet('Optimized', 'None')]
5893
[System.String]
@@ -134,14 +169,21 @@ function Get-TargetResource
134169
Identity = $Identity
135170
Description = $policy.Description
136171
AllowWebinars = $policy.AllowWebinars
172+
BroadcastPremiumApps = $policy.BroadcastPremiumApps
137173
EventAccessType = $policy.EventAccessType
138174
AllowEmailEditing = $policy.AllowEmailEditing
139175
AllowEventIntegrations = $policy.AllowEventIntegrations
140176
AllowTownhalls = $policy.AllowTownhalls
141177
AllowedQuestionTypesInRegistrationForm = $policy.AllowedQuestionTypesInRegistrationForm
142178
AllowedWebinarTypesForRecordingPublish = $policy.AllowedWebinarTypesForRecordingPublish
143179
AllowedTownhallTypesForRecordingPublish = $policy.AllowedTownhallTypesForRecordingPublish
180+
ImmersiveEvents = $policy.ImmersiveEvents
181+
RecordingForTownhall = $policy.RecordingForTownhall
182+
RecordingForWebinar = $policy.RecordingForWebinar
144183
TownhallChatExperience = $policy.TownhallChatExperience
184+
TownhallEventAttendeeAccess = $policy.TownhallEventAttendeeAccess
185+
TranscriptionForTownhall = $policy.TranscriptionForTownhall
186+
TranscriptionForWebinar = $policy.TranscriptionForWebinar
145187
UseMicrosoftECDN = $policy.UseMicrosoftECDN
146188
Ensure = 'Present'
147189
Credential = $Credential
@@ -184,6 +226,11 @@ function Set-TargetResource
184226
[ValidateSet('Enabled', 'Disabled')]
185227
$AllowWebinars,
186228

229+
[Parameter()]
230+
[System.String]
231+
[ValidateSet('Enabled', 'Disabled')]
232+
$BroadcastPremiumApps,
233+
187234
[Parameter()]
188235
[System.String]
189236
[ValidateSet('Everyone', 'EveryoneInCompanyExcludingGuests')]
@@ -218,6 +265,36 @@ function Set-TargetResource
218265
[System.String]
219266
$AllowedTownhallTypesForRecordingPublish,
220267

268+
[Parameter()]
269+
[System.String]
270+
[ValidateSet('Enabled', 'Disabled')]
271+
$ImmersiveEvents,
272+
273+
[Parameter()]
274+
[System.String]
275+
[ValidateSet('Enabled', 'Disabled')]
276+
$RecordingForTownhall,
277+
278+
[Parameter()]
279+
[System.String]
280+
[ValidateSet('Enabled', 'Disabled')]
281+
$RecordingForWebinar,
282+
283+
[Parameter()]
284+
[System.String]
285+
[ValidateSet('Everyone', 'EveryoneInOrganizationAndGuests')]
286+
$TownhallEventAttendeeAccess,
287+
288+
[Parameter()]
289+
[System.String]
290+
[ValidateSet('Enabled', 'Disabled')]
291+
$TranscriptionForTownhall,
292+
293+
[Parameter()]
294+
[System.String]
295+
[ValidateSet('Enabled', 'Disabled')]
296+
$TranscriptionForWebinar,
297+
221298
[Parameter()]
222299
[ValidateSet('Optimized', 'None')]
223300
[System.String]
@@ -321,6 +398,11 @@ function Test-TargetResource
321398
[ValidateSet('Enabled', 'Disabled')]
322399
$AllowWebinars,
323400

401+
[Parameter()]
402+
[System.String]
403+
[ValidateSet('Enabled', 'Disabled')]
404+
$BroadcastPremiumApps,
405+
324406
[Parameter()]
325407
[System.String]
326408
[ValidateSet('Everyone', 'EveryoneInCompanyExcludingGuests')]
@@ -355,6 +437,36 @@ function Test-TargetResource
355437
[System.String]
356438
$AllowedTownhallTypesForRecordingPublish,
357439

440+
[Parameter()]
441+
[System.String]
442+
[ValidateSet('Enabled', 'Disabled')]
443+
$ImmersiveEvents,
444+
445+
[Parameter()]
446+
[System.String]
447+
[ValidateSet('Enabled', 'Disabled')]
448+
$RecordingForTownhall,
449+
450+
[Parameter()]
451+
[System.String]
452+
[ValidateSet('Enabled', 'Disabled')]
453+
$RecordingForWebinar,
454+
455+
[Parameter()]
456+
[System.String]
457+
[ValidateSet('Everyone', 'EveryoneInOrganizationAndGuests')]
458+
$TownhallEventAttendeeAccess,
459+
460+
[Parameter()]
461+
[System.String]
462+
[ValidateSet('Enabled', 'Disabled')]
463+
$TranscriptionForTownhall,
464+
465+
[Parameter()]
466+
[System.String]
467+
[ValidateSet('Enabled', 'Disabled')]
468+
$TranscriptionForWebinar,
469+
358470
[Parameter()]
359471
[ValidateSet('Optimized', 'None')]
360472
[System.String]
@@ -473,12 +585,6 @@ function Export-TargetResource
473585

474586
try
475587
{
476-
$organization = ''
477-
if ($null -ne $Credential -and $Credential.UserName.Contains('@'))
478-
{
479-
$organization = $Credential.UserName.Split('@')[1]
480-
}
481-
482588
$i = 1
483589
[array]$policies = Get-CsTeamsEventsPolicy -ErrorAction Stop
484590
$dscContent = ''

Modules/Microsoft365DSC/DSCResources/MSFT_TeamsEventsPolicy/MSFT_TeamsEventsPolicy.schema.mof

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ class MSFT_TeamsEventsPolicy : OMI_BaseResource
1010
[Write, Description("This setting governs which users in a tenant can add which registration form questions to an event registration page for attendees to answer when registering for the event."), ValueMap{"DefaultOnly","DefaultAndPredefinedOnly","AllQuestions"}, Values{"DefaultOnly","DefaultAndPredefinedOnly","AllQuestions"}] String AllowedQuestionTypesInRegistrationForm;
1111
[Write, Description("This setting describes how IT admins can control which types of Town Hall attendees can have their recordings published."), ValueMap{"None","InviteOnly","EveryoneInCompanyIncludingGuests","Everyone"}, Values{"None","InviteOnly","EveryoneInCompanyIncludingGuests","Everyone"}] String AllowedTownhallTypesForRecordingPublish;
1212
[Write, Description("This setting describes how IT admins can control which types of webinar attendees can have their recordings published."), ValueMap{"None","InviteOnly","EveryoneInCompanyIncludingGuests","Everyone"}, Values{"None","InviteOnly","EveryoneInCompanyIncludingGuests","Everyone"}] String AllowedWebinarTypesForRecordingPublish;
13+
[Write, Description("This setting will enable Tenant Admins to specify if an organizer of a Teams Premium town hall may add an app that is accessible by everyone, including attendees, in a broadcast style Event including a Town hall."), ValueMap{"Enabled", "Disabled"}, Values{"Enabled", "Disabled"}] String BroadcastPremiumApps;
14+
[Write, Description("This setting governs if a user can create Immersive Events using Teams Events."), ValueMap{"Enabled", "Disabled"}, Values{"Enabled", "Disabled"}] String ImmersiveEvents;
15+
[Write, Description("Determines whether recording is allowed in a user's townhall."), ValueMap{"Enabled", "Disabled"}, Values{"Enabled", "Disabled"}] String RecordingForTownhall;
16+
[Write, Description("Determines whether recording is allowed in a user's webinar."), ValueMap{"Enabled", "Disabled"}, Values{"Enabled", "Disabled"}] String RecordingForWebinar;
17+
[Write, Description("This setting governs what identity types may attend a Town hall that is scheduled by a particular person or group that is assigned this policy."), ValueMap{"Everyone", "EveryoneInOrganizationAndGuests"}, Values{"Everyone", "EveryoneInOrganizationAndGuests"}] String TownhallEventAttendeeAccess;
18+
[Write, Description("Determines whether transcriptions are allowed in a user's townhall."), ValueMap{"Enabled", "Disabled"}, Values{"Enabled", "Disabled"}] String TranscriptionForTownhall;
19+
[Write, Description("Determines whether transcriptions are allowed in a user's webinar."), ValueMap{"Enabled", "Disabled"}, Values{"Enabled", "Disabled"}] String TranscriptionForWebinar;
1320
[Write, Description("Defines who is allowed to join the event."), ValueMap{"Everyone", "EveryoneInCompanyExcludingGuests"}, Values{"Everyone", "EveryoneInCompanyExcludingGuests"}] String EventAccessType;
1421
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
1522
[Write, Description("This setting governs whether the user can enable the Comment Stream chat experience for Town Halls."), ValueMap{"Optimized","None"}, Values{"Optimized","None"}] String TownhallChatExperience;

0 commit comments

Comments
 (0)