DSCResources/cTeamsFederationConfiguration/cTeamsFederationConfiguration.schema.psm1
configuration cTeamsFederationConfiguration { param ( [Parameter()] [hashtable[]] $Items ) <# TeamsFederationConfiguration [String] #ResourceName { Identity = [string]{ Global } [AccessTokens = [string[]]] [AllowedDomains = [string[]]] [AllowFederatedUsers = [bool]] [AllowPublicUsers = [bool]] [AllowTeamsConsumer = [bool]] [AllowTeamsConsumerInbound = [bool]] [ApplicationId = [string]] [BlockedDomains = [string[]]] [CertificateThumbprint = [string]] [Credential = [PSCredential]] [DependsOn = [string[]]] [ExternalAccessWithTrialTenants = [string]{ Allowed | Blocked }] [ManagedIdentity = [bool]] [PsDscRunAsCredential = [PSCredential]] [RestrictTeamsConsumerToExternalUserProfiles = [bool]] [SharedSipAddressSpace = [bool]] [TenantId = [string]] [TreatDiscoveredPartnersAsUnverified = [bool]] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'TeamsFederationConfiguration' $param = $PSBoundParameters $param.Remove("InstanceName") $dscParameterKeys = 'Identity' -split ', ' foreach ($item in $Items) { $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) } } |