DscResources/Teams/Teams.schema.psm1

# (2024-02-08 01:07:32) Generated using Microsoft365DSC v1.24.207.1
Configuration 'Teams'
{
    param
    (
        [Parameter(Mandatory = $true)]
        [System.String]
        $ApplicationId,

        [Parameter(Mandatory = $true)]
        [System.String]
        $TenantId,

        [Parameter(Mandatory = $true)]
        [System.String]
        $CertificateThumbprint
    )

    Import-DscResource -ModuleName Microsoft365DSC

    foreach ($AppPermissionPolicy in $ConfigurationData.NonNodeData.Teams.AppPermissionPolicies)
    {
        $resourceTitle = 'TeamsAppPermissionPolicy-{0}' -f $AppPermissionPolicy.Identity

        $parameters = $AppPermissionPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsAppPermissionPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($AppSetupPolicy in $ConfigurationData.NonNodeData.Teams.AppSetupPolicies)
    {
        $resourceTitle = 'TeamsAppSetupPolicy-{0}' -f $AppSetupPolicy.Identity

        $parameters = $AppSetupPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsAppSetupPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($AudioConferencingPolicy in $ConfigurationData.NonNodeData.Teams.AudioConferencingPolicies)
    {
        $resourceTitle = 'TeamsAudioConferencingPolicy-{0}' -f $AudioConferencingPolicy.Identity

        $parameters = $AudioConferencingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsAudioConferencingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($CallHoldPolicy in $ConfigurationData.NonNodeData.Teams.CallHoldPolicies)
    {
        $resourceTitle = 'TeamsCallHoldPolicy-{0}' -f $CallHoldPolicy.Identity

        $parameters = $CallHoldPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsCallHoldPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($CallingPolicy in $ConfigurationData.NonNodeData.Teams.CallingPolicies)
    {
        $resourceTitle = 'TeamsCallingPolicy-{0}' -f $CallingPolicy.Identity

        $parameters = $CallingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsCallingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($CallParkPolicy in $ConfigurationData.NonNodeData.Teams.CallParkPolicies)
    {
        $resourceTitle = 'TeamsCallParkPolicy-{0}' -f $CallParkPolicy.Identity

        $parameters = $CallParkPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsCallParkPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($CallQueue in $ConfigurationData.NonNodeData.Teams.CallQueues)
    {
        $resourceTitle = 'TeamsCallQueue-{0}' -f $CallQueue.Name

        $parameters = $CallQueue
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsCallQueue' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($Channel in $ConfigurationData.NonNodeData.Teams.Channels)
    {
        $resourceTitle = 'TeamsChannel-{0}-{1}' -f $Channel.DisplayName,$Channel.TeamName

        $parameters = $Channel
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsChannel' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($ChannelsPolicy in $ConfigurationData.NonNodeData.Teams.ChannelsPolicies)
    {
        $resourceTitle = 'TeamsChannelsPolicy-{0}' -f $ChannelsPolicy.Identity

        $parameters = $ChannelsPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsChannelsPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($ChannelTab in $ConfigurationData.NonNodeData.Teams.ChannelTabs)
    {
        $resourceTitle = 'TeamsChannelTab-{0}-{1}-{2}' -f $ChannelTab.DisplayName,$ChannelTab.TeamName,$ChannelTab.ChannelName

        $parameters = $ChannelTab
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsChannelTab' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('ClientConfiguration'))
    {
        $resourceTitle = 'ClientConfigurationDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.ClientConfiguration
        $parameters.Identity = 'Global'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsClientConfiguration' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($ComplianceRecordingPolicy in $ConfigurationData.NonNodeData.Teams.ComplianceRecordingPolicies)
    {
        $resourceTitle = 'TeamsComplianceRecordingPolicy-{0}' -f $ComplianceRecordingPolicy.Identity

        $parameters = $ComplianceRecordingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsComplianceRecordingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($CortanaPolicy in $ConfigurationData.NonNodeData.Teams.CortanaPolicies)
    {
        $resourceTitle = 'TeamsCortanaPolicy-{0}' -f $CortanaPolicy.Identity

        $parameters = $CortanaPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsCortanaPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('DialInConferencingTenantSettings'))
    {
        $resourceTitle = 'DialInConferencingTenantSettingsDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.DialInConferencingTenantSettings
        $parameters.IsSingleInstance = 'Yes'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsDialInConferencingTenantSettings' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($EmergencyCallingPolicy in $ConfigurationData.NonNodeData.Teams.EmergencyCallingPolicies)
    {
        $resourceTitle = 'TeamsEmergencyCallingPolicy-{0}' -f $EmergencyCallingPolicy.Identity

        $parameters = $EmergencyCallingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsEmergencyCallingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($EmergencyCallRoutingPolicy in $ConfigurationData.NonNodeData.Teams.EmergencyCallRoutingPolicies)
    {
        $resourceTitle = 'TeamsEmergencyCallRoutingPolicy-{0}' -f $EmergencyCallRoutingPolicy.Identity

        $parameters = $EmergencyCallRoutingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        if ($parameters.ContainsKey('EmergencyNumbers'))
        {
            $parameters.EmergencyNumbers = $parameters.EmergencyNumbers | ForEach-Object {
                if ($_.ContainsKey('UniqueId'))
                {
                    $_.Remove('UniqueId')
                }

                (Get-DscSplattedResource -ResourceName 'MSFT_TeamsEmergencyNumber' -Properties $_ -NoInvoke).Invoke($_)
            }
        }

        (Get-DscSplattedResource -ResourceName 'TeamsEmergencyCallRoutingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($EnhancedEncryptionPolicy in $ConfigurationData.NonNodeData.Teams.EnhancedEncryptionPolicies)
    {
        $resourceTitle = 'TeamsEnhancedEncryptionPolicy-{0}' -f $EnhancedEncryptionPolicy.Identity

        $parameters = $EnhancedEncryptionPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsEnhancedEncryptionPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($EventsPolicy in $ConfigurationData.NonNodeData.Teams.EventsPolicies)
    {
        $resourceTitle = 'TeamsEventsPolicy-{0}' -f $EventsPolicy.Identity

        $parameters = $EventsPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsEventsPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('FederationConfiguration'))
    {
        $resourceTitle = 'FederationConfigurationDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.FederationConfiguration
        $parameters.Identity = 'Global'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsFederationConfiguration' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($FeedbackPolicy in $ConfigurationData.NonNodeData.Teams.FeedbackPolicies)
    {
        $resourceTitle = 'TeamsFeedbackPolicy-{0}' -f $FeedbackPolicy.Identity

        $parameters = $FeedbackPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsFeedbackPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($FilesPolicy in $ConfigurationData.NonNodeData.Teams.FilesPolicies)
    {
        $resourceTitle = 'TeamsFilesPolicy-{0}' -f $FilesPolicy.Identity

        $parameters = $FilesPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsFilesPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($GroupPolicyAssignment in $ConfigurationData.NonNodeData.Teams.GroupPoliciesAssignment)
    {
        $resourceTitle = 'TeamsGroupPolicyAssignment-{0}-{1}' -f $GroupPolicyAssignment.GroupDisplayName,$GroupPolicyAssignment.PolicyType

        $parameters = $GroupPolicyAssignment
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsGroupPolicyAssignment' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('GuestCallingConfiguration'))
    {
        $resourceTitle = 'GuestCallingConfigurationDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.GuestCallingConfiguration
        $parameters.Identity = 'Global'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsGuestCallingConfiguration' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('GuestMeetingConfiguration'))
    {
        $resourceTitle = 'GuestMeetingConfigurationDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.GuestMeetingConfiguration
        $parameters.Identity = 'Global'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsGuestMeetingConfiguration' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('GuestMessagingConfiguration'))
    {
        $resourceTitle = 'GuestMessagingConfigurationDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.GuestMessagingConfiguration
        $parameters.Identity = 'Global'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsGuestMessagingConfiguration' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($IPPhonePolicy in $ConfigurationData.NonNodeData.Teams.IPPhonePolicies)
    {
        $resourceTitle = 'TeamsIPPhonePolicy-{0}' -f $IPPhonePolicy.Identity

        $parameters = $IPPhonePolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsIPPhonePolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('MeetingBroadcastConfiguration'))
    {
        $resourceTitle = 'MeetingBroadcastConfigurationDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.MeetingBroadcastConfiguration
        $parameters.Identity = 'Global'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsMeetingBroadcastConfiguration' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($MeetingBroadcastPolicy in $ConfigurationData.NonNodeData.Teams.MeetingBroadcastPolicies)
    {
        $resourceTitle = 'TeamsMeetingBroadcastPolicy-{0}' -f $MeetingBroadcastPolicy.Identity

        $parameters = $MeetingBroadcastPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsMeetingBroadcastPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('MeetingConfiguration'))
    {
        $resourceTitle = 'MeetingConfigurationDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.MeetingConfiguration
        $parameters.Identity = 'Global'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsMeetingConfiguration' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($MeetingPolicy in $ConfigurationData.NonNodeData.Teams.MeetingPolicies)
    {
        $resourceTitle = 'TeamsMeetingPolicy-{0}' -f $MeetingPolicy.Identity

        $parameters = $MeetingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsMeetingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($MessagingPolicy in $ConfigurationData.NonNodeData.Teams.MessagingPolicies)
    {
        $resourceTitle = 'TeamsMessagingPolicy-{0}' -f $MessagingPolicy.Identity

        $parameters = $MessagingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsMessagingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($MobilityPolicy in $ConfigurationData.NonNodeData.Teams.MobilityPolicies)
    {
        $resourceTitle = 'TeamsMobilityPolicy-{0}' -f $MobilityPolicy.Identity

        $parameters = $MobilityPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsMobilityPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($NetworkRoamingPolicy in $ConfigurationData.NonNodeData.Teams.NetworkRoamingPolicies)
    {
        $resourceTitle = 'TeamsNetworkRoamingPolicy-{0}' -f $NetworkRoamingPolicy.Identity

        $parameters = $NetworkRoamingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsNetworkRoamingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($OnlineVoicemailPolicy in $ConfigurationData.NonNodeData.Teams.OnlineVoicemailPolicies)
    {
        $resourceTitle = 'TeamsOnlineVoicemailPolicy-{0}' -f $OnlineVoicemailPolicy.Identity

        $parameters = $OnlineVoicemailPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsOnlineVoicemailPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($OnlineVoicemailUserSettingsItems in $ConfigurationData.NonNodeData.Teams.OnlineVoicemailUserSettingsItems)
    {
        $resourceTitle = 'TeamsOnlineVoicemailUserSettings-{0}' -f $OnlineVoicemailUserSettingsItems.Identity

        $parameters = $OnlineVoicemailUserSettingsItems
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsOnlineVoicemailUserSettings' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($OnlineVoiceUser in $ConfigurationData.NonNodeData.Teams.OnlineVoiceUsers)
    {
        $resourceTitle = 'TeamsOnlineVoiceUser-{0}' -f $OnlineVoiceUser.Identity

        $parameters = $OnlineVoiceUser
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsOnlineVoiceUser' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($PstnUsage in $ConfigurationData.NonNodeData.Teams.PstnUsages)
    {
        $resourceTitle = 'TeamsPstnUsage-{0}' -f $PstnUsage.Usage

        $parameters = $PstnUsage
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsPstnUsage' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($ShiftsPolicy in $ConfigurationData.NonNodeData.Teams.ShiftsPolicies)
    {
        $resourceTitle = 'TeamsShiftsPolicy-{0}' -f $ShiftsPolicy.Identity

        $parameters = $ShiftsPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsShiftsPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($Team in $ConfigurationData.NonNodeData.Teams.Teams)
    {
        $resourceTitle = 'TeamsTeam-{0}' -f $Team.DisplayName

        $parameters = $Team
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsTeam' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($TemplatesPolicy in $ConfigurationData.NonNodeData.Teams.TemplatesPolicies)
    {
        $resourceTitle = 'TeamsTemplatesPolicy-{0}' -f $TemplatesPolicy.Identity

        $parameters = $TemplatesPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsTemplatesPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($TenantDialPlan in $ConfigurationData.NonNodeData.Teams.TenantDialPlans)
    {
        $resourceTitle = 'TeamsTenantDialPlan-{0}' -f $TenantDialPlan.Identity

        $parameters = $TenantDialPlan
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        if ($parameters.ContainsKey('NormalizationRules'))
        {
            $parameters.NormalizationRules = $parameters.NormalizationRules | ForEach-Object {
                if ($_.ContainsKey('UniqueId'))
                {
                    $_.Remove('UniqueId')
                }

                (Get-DscSplattedResource -ResourceName 'MSFT_TeamsVoiceNormalizationRule' -Properties $_ -NoInvoke).Invoke($_)
            }
        }

        (Get-DscSplattedResource -ResourceName 'TeamsTenantDialPlan' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($TenantNetworkRegion in $ConfigurationData.NonNodeData.Teams.TenantNetworkRegions)
    {
        $resourceTitle = 'TeamsTenantNetworkRegion-{0}' -f $TenantNetworkRegion.Identity

        $parameters = $TenantNetworkRegion
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsTenantNetworkRegion' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($TenantNetworkSite in $ConfigurationData.NonNodeData.Teams.TenantNetworkSites)
    {
        $resourceTitle = 'TeamsTenantNetworkSite-{0}' -f $TenantNetworkSite.Identity

        $parameters = $TenantNetworkSite
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsTenantNetworkSite' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($TenantNetworkSubnet in $ConfigurationData.NonNodeData.Teams.TenantNetworkSubnets)
    {
        $resourceTitle = 'TeamsTenantNetworkSubnet-{0}-{1}' -f $TenantNetworkSubnet.MaskBits,$TenantNetworkSubnet.Identity

        $parameters = $TenantNetworkSubnet
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsTenantNetworkSubnet' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($TenantTrustedIPAddress in $ConfigurationData.NonNodeData.Teams.TenantTrustedIPAddresss)
    {
        $resourceTitle = 'TeamsTenantTrustedIPAddress-{0}' -f $TenantTrustedIPAddress.Identity

        $parameters = $TenantTrustedIPAddress
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsTenantTrustedIPAddress' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($TranslationRule in $ConfigurationData.NonNodeData.Teams.TranslationRules)
    {
        $resourceTitle = 'TeamsTranslationRule-{0}' -f $TranslationRule.Identity

        $parameters = $TranslationRule
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsTranslationRule' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($UnassignedNumberTreatment in $ConfigurationData.NonNodeData.Teams.UnassignedNumberTreatments)
    {
        $resourceTitle = 'TeamsUnassignedNumberTreatment-{0}' -f $UnassignedNumberTreatment.Identity

        $parameters = $UnassignedNumberTreatment
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsUnassignedNumberTreatment' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($UpdateManagementPolicy in $ConfigurationData.NonNodeData.Teams.UpdateManagementPolicies)
    {
        $resourceTitle = 'TeamsUpdateManagementPolicy-{0}' -f $UpdateManagementPolicy.Identity

        $parameters = $UpdateManagementPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsUpdateManagementPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    if ($ConfigurationData.NonNodeData.Teams.ContainsKey('UpgradeConfiguration'))
    {
        $resourceTitle = 'UpgradeConfigurationDefaults'

        $parameters = $ConfigurationData.NonNodeData.Teams.UpgradeConfiguration
        $parameters.IsSingleInstance = 'Yes'
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsUpgradeConfiguration' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($UpgradePolicy in $ConfigurationData.NonNodeData.Teams.UpgradePolicies)
    {
        $resourceTitle = 'TeamsUpgradePolicy-{0}' -f $UpgradePolicy.Identity

        $parameters = $UpgradePolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsUpgradePolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($User in $ConfigurationData.NonNodeData.Teams.Users)
    {
        $resourceTitle = 'TeamsUser-{0}-{1}' -f $User.TeamName,$User.User

        $parameters = $User
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsUser' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($UserCallingSettingsItems in $ConfigurationData.NonNodeData.Teams.UserCallingSettingsItems)
    {
        $resourceTitle = 'TeamsUserCallingSettings-{0}' -f $UserCallingSettingsItems.Identity

        $parameters = $UserCallingSettingsItems
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsUserCallingSettings' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($UserPolicyAssignment in $ConfigurationData.NonNodeData.Teams.UserPoliciesAssignment)
    {
        $resourceTitle = 'TeamsUserPolicyAssignment-{0}' -f $UserPolicyAssignment.User

        $parameters = $UserPolicyAssignment
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsUserPolicyAssignment' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($VdiPolicy in $ConfigurationData.NonNodeData.Teams.VdiPolicies)
    {
        $resourceTitle = 'TeamsVdiPolicy-{0}' -f $VdiPolicy.Identity

        $parameters = $VdiPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsVdiPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($VoiceRoute in $ConfigurationData.NonNodeData.Teams.VoiceRoutes)
    {
        $resourceTitle = 'TeamsVoiceRoute-{0}' -f $VoiceRoute.Identity

        $parameters = $VoiceRoute
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsVoiceRoute' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($VoiceRoutingPolicy in $ConfigurationData.NonNodeData.Teams.VoiceRoutingPolicies)
    {
        $resourceTitle = 'TeamsVoiceRoutingPolicy-{0}' -f $VoiceRoutingPolicy.Identity

        $parameters = $VoiceRoutingPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsVoiceRoutingPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($WorkloadPolicy in $ConfigurationData.NonNodeData.Teams.WorkloadPolicies)
    {
        $resourceTitle = 'TeamsWorkloadPolicy-{0}' -f $WorkloadPolicy.Identity

        $parameters = $WorkloadPolicy
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'TeamsWorkloadPolicy' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }
}