DSCResources/cTeamsUserCallingSettings/cTeamsUserCallingSettings.schema.psm1
configuration cTeamsUserCallingSettings { param ( [Parameter()] [hashtable[]] $Items ) <# TeamsUserCallingSettings [String] #ResourceName { Identity = [string] [AccessTokens = [string[]]] [ApplicationId = [string]] [CallGroupOrder = [string]] [CallGroupTargets = [string[]]] [CertificateThumbprint = [string]] [Credential = [PSCredential]] [DependsOn = [string[]]] [Ensure = [string]{ Absent | Present }] [ForwardingTarget = [string]] [ForwardingTargetType = [string]{ Group | MyDelegates | SingleTarget | Voicemail }] [ForwardingType = [string]{ Immediate | Simultaneous }] [GroupNotificationOverride = [string]{ Banner | Mute | Ring }] [IsForwardingEnabled = [bool]] [IsUnansweredEnabled = [bool]] [ManagedIdentity = [bool]] [PsDscRunAsCredential = [PSCredential]] [TenantId = [string]] [UnansweredDelay = [string]] [UnansweredTarget = [string]] [UnansweredTargetType = [string]{ Group | MyDelegates | SingleTarget | Voicemail }] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'TeamsUserCallingSettings' $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) } } |