DSCResources/cTeamsMeetingPolicy/cTeamsMeetingPolicy.schema.psm1

configuration cTeamsMeetingPolicy {
    param (
        [Parameter()]
        [hashtable[]]
        $Items
)

<#
TeamsMeetingPolicy [String] #ResourceName
{
    Identity = [string]
    [AccessTokens = [string[]]]
    [AllowAnnotations = [bool]]
    [AllowAnonymousUsersToDialOut = [bool]]
    [AllowAnonymousUsersToJoinMeeting = [bool]]
    [AllowAnonymousUsersToStartMeeting = [bool]]
    [AllowBreakoutRooms = [bool]]
    [AllowCartCaptionsScheduling = [string]{ Disabled | DisabledUserOverride | EnabledUserOverride }]
    [AllowChannelMeetingScheduling = [bool]]
    [AllowCloudRecording = [bool]]
    [AllowDocumentCollaboration = [string]]
    [AllowedStreamingMediaInput = [string]]
    [AllowEngagementReport = [string]{ Disabled | Enabled }]
    [AllowExternalParticipantGiveRequestControl = [bool]]
    [AllowIPAudio = [bool]]
    [AllowIPVideo = [bool]]
    [AllowMeetingCoach = [bool]]
    [AllowMeetingReactions = [bool]]
    [AllowMeetingRegistration = [bool]]
    [AllowMeetNow = [bool]]
    [AllowNDIStreaming = [bool]]
    [AllowNetworkConfigurationSettingsLookup = [bool]]
    [AllowOrganizersToOverrideLobbySettings = [bool]]
    [AllowOutlookAddIn = [bool]]
    [AllowParticipantGiveRequestControl = [bool]]
    [AllowPowerPointSharing = [bool]]
    [AllowPrivateMeetingScheduling = [bool]]
    [AllowPrivateMeetNow = [bool]]
    [AllowPSTNUsersToBypassLobby = [bool]]
    [AllowRecordingStorageOutsideRegion = [bool]]
    [AllowSharedNotes = [bool]]
    [AllowTranscription = [bool]]
    [AllowUserToJoinExternalMeeting = [string]{ Disabled | Enabled | FederatedOnly }]
    [AllowWatermarkForCameraVideo = [bool]]
    [AllowWatermarkForScreenSharing = [bool]]
    [AllowWhiteboard = [bool]]
    [ApplicationId = [string]]
    [AutoAdmittedUsers = [string]{ Everyone | EveryoneInCompany | EveryoneInCompanyExcludingGuests | EveryoneInSameAndFederatedCompany | InvitedUsers | OrganizerOnly }]
    [BlockedAnonymousJoinClientTypes = [string]]
    [CertificateThumbprint = [string]]
    [ChannelRecordingDownload = [string]]
    [Credential = [PSCredential]]
    [DependsOn = [string[]]]
    [Description = [string]]
    [DesignatedPresenterRoleMode = [string]{ EveryoneInCompanyUserOverride | EveryoneUserOverride | OrganizerOnlyUserOverride }]
    [EnrollUserOverride = [string]{ Disabled | Enabled }]
    [Ensure = [string]{ Absent | Present }]
    [ExplicitRecordingConsent = [string]]
    [ForceStreamingAttendeeMode = [string]]
    [InfoShownInReportMode = [string]]
    [IPAudioMode = [string]{ Disabled | EnabledOutgoingIncoming }]
    [IPVideoMode = [string]{ Disabled | EnabledOutgoingIncoming }]
    [LiveCaptionsEnabledType = [string]{ Disabled | DisabledUserOverride }]
    [LiveInterpretationEnabledType = [string]]
    [LiveStreamingMode = [string]{ Disabled | Enabled }]
    [ManagedIdentity = [bool]]
    [MediaBitRateKb = [UInt32]]
    [MeetingChatEnabledType = [string]{ Disabled | Enabled | EnabledExceptAnonymous }]
    [MeetingInviteLanguages = [string]]
    [NewMeetingRecordingExpirationDays = [Int32]]
    [PreferredMeetingProviderForIslandsMode = [string]{ Teams | TeamsAndSfb }]
    [PsDscRunAsCredential = [PSCredential]]
    [QnAEngagementMode = [string]]
    [RoomAttributeUserOverride = [string]{ Attribute | Distinguish | Off }]
    [RoomPeopleNameUserOverride = [string]]
    [ScreenSharingMode = [string]{ Disabled | EntireScreen | SingleApplication }]
    [SpeakerAttributionMode = [string]{ Disabled | EnabledUserOverride }]
    [StreamingAttendeeMode = [string]{ Disabled | Enabled }]
    [TeamsCameraFarEndPTZMode = [string]{ AutoAcceptAll | AutoAcceptInTenant | Disabled }]
    [TenantId = [string]]
    [VideoFiltersMode = [string]{ AllFilters | BlurAndDefaultBackgrounds | BlurOnly | NoFilters }]
    [WhoCanRegister = [string]{ Everyone | EveryoneInCompany }]
}
 
#>



    Import-DscResource -ModuleName PSDesiredStateConfiguration
    Import-DscResource -ModuleName Microsoft365DSC

    $dscResourceName = 'TeamsMeetingPolicy'

    $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)
    }
}