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]{ Disabled | Enabled }]
    [AllowedStreamingMediaInput = [string]]
    [AllowEngagementReport = [string]{ Disabled | Enabled | ForceEnabled }]
    [AllowExternalNonTrustedMeetingChat = [bool]]
    [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]]
    [AttendeeIdentityMasking = [string]{ Disabled | DisabledUserOverride | Enabled }]
    [AutoAdmittedUsers = [string]{ Everyone | EveryoneInCompany | EveryoneInCompanyExcludingGuests | EveryoneInSameAndFederatedCompany | InvitedUsers | OrganizerOnly }]
    [AutomaticallyStartCopilot = [string]{ Disabled | Enabled }]
    [AutoRecording = [string]{ Disabled | Enabled }]
    [BlockedAnonymousJoinClientTypes = [string]]
    [CertificateThumbprint = [string]]
    [ChannelRecordingDownload = [string]{ Allow | Block }]
    [ConnectToMeetingControls = [string]{ Disabled | Enabled }]
    [ContentSharingInExternalMeetings = [string]{ Disabled | EnabledForAnyone | EnabledForTrustedOrgs }]
    [Copilot = [string]{ Disabled | Enabled | EnabledWithTranscript | EnabledWithTranscriptDefaultOn }]
    [CopyRestriction = [bool]]
    [Credential = [PSCredential]]
    [DependsOn = [string[]]]
    [Description = [string]]
    [DesignatedPresenterRoleMode = [string]{ EveryoneInCompanyUserOverride | EveryoneUserOverride | OrganizerOnlyUserOverride }]
    [DetectSensitiveContentDuringScreenSharing = [bool]]
    [EnrollUserOverride = [string]{ Disabled | Enabled }]
    [Ensure = [string]{ Absent | Present }]
    [ExplicitRecordingConsent = [string]{ Disabled | Enabled }]
    [ExternalMeetingJoin = [string]{ Disabled | EnabledForAnyone | EnabledForTrustedOrgs }]
    [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]]
    [ParticipantNameChange = [string]{ Disabled | Enabled }]
    [PreferredMeetingProviderForIslandsMode = [string]{ Teams | TeamsAndSfb }]
    [PsDscRunAsCredential = [PSCredential]]
    [QnAEngagementMode = [string]{ Disabled | Enabled }]
    [RoomAttributeUserOverride = [string]{ Attribute | Distinguish | Off }]
    [RoomPeopleNameUserOverride = [string]{ Off | On }]
    [ScreenSharingMode = [string]{ Disabled | EntireScreen | SingleApplication }]
    [SpeakerAttributionMode = [string]{ Disabled | DisabledUserOverride | Enabled | EnabledUserOverride }]
    [StreamingAttendeeMode = [string]{ Disabled | Enabled }]
    [TeamsCameraFarEndPTZMode = [string]{ AutoAcceptAll | AutoAcceptInTenant | Disabled }]
    [TenantId = [string]]
    [VideoFiltersMode = [string]{ AllFilters | BlurAndDefaultBackgrounds | BlurOnly | NoFilters }]
    [VoiceIsolation = [string]{ Disabled | Enabled }]
    [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)
    }
}