DSCResources/cIntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10/cIntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10.schema.psm1
configuration cIntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10 { param ( [Parameter()] [hashtable[]] $Items ) <# IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10 [String] #ResourceName { DisplayName = [string] [AccessTokens = [string[]]] [ApplicationId = [string]] [ApplicationSecret = [PSCredential]] [Assignments = [MSFT_DeviceManagementConfigurationPolicyAssignments[]]] [BackgroundDownloadFromHttpDelayInSeconds = [UInt64]] [BandwidthMode = [MSFT_MicrosoftGraphdeliveryOptimizationBandwidth]] [CacheServerBackgroundDownloadFallbackToHttpDelayInSeconds = [UInt32]] [CacheServerForegroundDownloadFallbackToHttpDelayInSeconds = [UInt32]] [CacheServerHostNames = [string[]]] [CertificateThumbprint = [string]] [Credential = [PSCredential]] [DeliveryOptimizationMode = [string]{ bypassMode | httpOnly | httpWithInternetPeering | httpWithPeeringNat | httpWithPeeringPrivateGroup | simpleDownload | userDefined }] [DependsOn = [string[]]] [Description = [string]] [Ensure = [string]{ Absent | Present }] [ForegroundDownloadFromHttpDelayInSeconds = [UInt64]] [GroupIdSource = [MSFT_MicrosoftGraphdeliveryOptimizationGroupIdSource]] [Id = [string]] [ManagedIdentity = [bool]] [MaximumCacheAgeInDays = [UInt32]] [MaximumCacheSize = [MSFT_MicrosoftGraphdeliveryOptimizationMaxCacheSize]] [MinimumBatteryPercentageAllowedToUpload = [UInt32]] [MinimumDiskSizeAllowedToPeerInGigabytes = [UInt32]] [MinimumFileSizeToCacheInMegabytes = [UInt32]] [MinimumRamAllowedToPeerInGigabytes = [UInt32]] [ModifyCacheLocation = [string]] [PsDscRunAsCredential = [PSCredential]] [RestrictPeerSelectionBy = [string]{ notConfigured | subnetMask }] [SupportsScopeTags = [bool]] [TenantId = [string]] [VpnPeerCaching = [string]{ disabled | enabled | notConfigured }] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'IntuneDeviceConfigurationDeliveryOptimizationPolicyWindows10' $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) } } |