DSCResources/cTeamsEventsPolicy/cTeamsEventsPolicy.schema.psm1
configuration cTeamsEventsPolicy { param ( [Parameter()] [hashtable[]] $Items ) <# TeamsEventsPolicy [String] #ResourceName { Identity = [string] [AccessTokens = [string[]]] [AllowedQuestionTypesInRegistrationForm = [string]{ AllQuestions | DefaultAndPredefinedOnly | DefaultOnly }] [AllowedTownhallTypesForRecordingPublish = [string]{ Everyone | EveryoneInCompanyIncludingGuests | InviteOnly | None }] [AllowedWebinarTypesForRecordingPublish = [string]{ Everyone | EveryoneInCompanyIncludingGuests | InviteOnly | None }] [AllowEmailEditing = [string]{ Disabled | Enabled }] [AllowEventIntegrations = [bool]] [AllowTownhalls = [string]{ Disabled | Enabled }] [AllowWebinars = [string]{ Disabled | Enabled }] [ApplicationId = [string]] [CertificateThumbprint = [string]] [Credential = [PSCredential]] [DependsOn = [string[]]] [Description = [string]] [Ensure = [string]{ Absent | Present }] [EventAccessType = [string]{ Everyone | EveryoneInCompanyExcludingGuests }] [ManagedIdentity = [bool]] [PsDscRunAsCredential = [PSCredential]] [TenantId = [string]] [TownhallChatExperience = [string]{ None | Optimized }] [UseMicrosoftECDN = [bool]] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'TeamsEventsPolicy' $param = $PSBoundParameters $param.Remove("InstanceName") $dscParameterKeys = 'Identity' -split ', ' foreach ($item in $Items) { if (-not $item.ContainsKey('Ensure')) { $item.Ensure = 'Present' } $keyValues = foreach ($key in $dscParameterKeys) { $item.$key } $executionName = $keyValues -join '_' $executionName = $executionName -replace "[\s()\\:*-+/{}```"']", '_' (Get-DscSplattedResource -ResourceName $dscResourceName -ExecutionName $executionName -Properties $item -NoInvoke).Invoke($item) } } |