DSCResources/cIntuneWifiConfigurationPolicyMacOS/cIntuneWifiConfigurationPolicyMacOS.schema.psm1
configuration cIntuneWifiConfigurationPolicyMacOS { param ( [Parameter()] [hashtable[]] $Items ) <# IntuneWifiConfigurationPolicyMacOS [String] #ResourceName { DisplayName = [string] [AccessTokens = [string[]]] [ApplicationId = [string]] [ApplicationSecret = [PSCredential]] [Assignments = [MSFT_DeviceManagementConfigurationPolicyAssignments[]]] [CertificateThumbprint = [string]] [ConnectAutomatically = [bool]] [ConnectWhenNetworkNameIsHidden = [bool]] [Credential = [PSCredential]] [DependsOn = [string[]]] [Description = [string]] [Ensure = [string]{ Absent | Present }] [Id = [string]] [ManagedIdentity = [bool]] [NetworkName = [string]] [PreSharedKey = [string]] [ProxyAutomaticConfigurationUrl = [string]] [ProxyManualAddress = [string]] [ProxyManualPort = [UInt32]] [ProxySettings = [string]{ automatic | manual | none }] [PsDscRunAsCredential = [PSCredential]] [Ssid = [string]] [TenantId = [string]] [WiFiSecurityType = [string]{ open | wep | wpa2Enterprise | wpa2Personal | wpaEnterprise | wpaPersonal }] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'IntuneWifiConfigurationPolicyMacOS' $param = $PSBoundParameters $param.Remove("InstanceName") $dscParameterKeys = 'DisplayName' -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) } } |