DSCResources/cEXOInboundConnector/cEXOInboundConnector.schema.psm1
configuration cEXOInboundConnector { param ( [Parameter()] [hashtable[]] $Items ) <# EXOInboundConnector [String] #ResourceName { Identity = [string] [AccessTokens = [string[]]] [ApplicationId = [string]] [AssociatedAcceptedDomains = [string[]]] [CertificatePassword = [PSCredential]] [CertificatePath = [string]] [CertificateThumbprint = [string]] [CloudServicesMailEnabled = [bool]] [Comment = [string]] [ConnectorSource = [string]{ Default | HybridWizard | Migrated }] [ConnectorType = [string]{ OnPremises | Partner }] [Credential = [PSCredential]] [DependsOn = [string[]]] [EFSkipIPs = [string[]]] [EFSkipLastIP = [bool]] [EFUsers = [string[]]] [Enabled = [bool]] [Ensure = [string]{ Absent | Present }] [ManagedIdentity = [bool]] [PsDscRunAsCredential = [PSCredential]] [RequireTls = [bool]] [RestrictDomainsToCertificate = [bool]] [RestrictDomainsToIPAddresses = [bool]] [SenderDomains = [string[]]] [SenderIPAddresses = [string[]]] [TenantId = [string]] [TlsSenderCertificateName = [string]] [TreatMessagesAsInternal = [bool]] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'EXOInboundConnector' $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) } } |