DSCResources/cIntuneDeviceCompliancePolicyWindows10/cIntuneDeviceCompliancePolicyWindows10.schema.psm1

configuration cIntuneDeviceCompliancePolicyWindows10 {
    param (
        [Parameter()]
        [hashtable[]]
        $Items
)

<#
IntuneDeviceCompliancePolicyWindows10 [String] #ResourceName
{
    DisplayName = [string]
    [AccessTokens = [string[]]]
    [ActiveFirewallRequired = [bool]]
    [AntiSpywareRequired = [bool]]
    [AntivirusRequired = [bool]]
    [ApplicationId = [string]]
    [ApplicationSecret = [PSCredential]]
    [Assignments = [MSFT_DeviceManagementConfigurationPolicyAssignments[]]]
    [BitLockerEnabled = [bool]]
    [CertificateThumbprint = [string]]
    [CodeIntegrityEnabled = [bool]]
    [ConfigurationManagerComplianceRequired = [bool]]
    [Credential = [PSCredential]]
    [DefenderEnabled = [bool]]
    [DefenderVersion = [string]]
    [DependsOn = [string[]]]
    [Description = [string]]
    [DeviceCompliancePolicyScript = [string]]
    [DeviceThreatProtectionEnabled = [bool]]
    [DeviceThreatProtectionRequiredSecurityLevel = [string]{ High | Low | Medium | NotSet | Secured | Unavailable }]
    [EarlyLaunchAntiMalwareDriverEnabled = [bool]]
    [Ensure = [string]{ Absent | Present }]
    [ManagedIdentity = [bool]]
    [MobileOsMaximumVersion = [string]]
    [MobileOsMinimumVersion = [string]]
    [OsMaximumVersion = [string]]
    [OsMinimumVersion = [string]]
    [PasswordBlockSimple = [bool]]
    [PasswordExpirationDays = [UInt32]]
    [PasswordMinimumCharacterSetCount = [UInt32]]
    [PasswordMinimumLength = [UInt32]]
    [PasswordMinutesOfInactivityBeforeLock = [UInt32]]
    [PasswordPreviousPasswordBlockCount = [UInt32]]
    [PasswordRequired = [bool]]
    [PasswordRequiredToUnlockFromIdle = [bool]]
    [PasswordRequiredType = [string]{ Alphanumeric | DeviceDefault | Numeric }]
    [PsDscRunAsCredential = [PSCredential]]
    [RequireHealthyDeviceReport = [bool]]
    [RTPEnabled = [bool]]
    [SecureBootEnabled = [bool]]
    [SignatureOutOfDate = [bool]]
    [StorageRequireEncryption = [bool]]
    [TenantId = [string]]
    [TpmRequired = [bool]]
    [ValidOperatingSystemBuildRanges = [MSFT_MicrosoftGraphOperatingSystemVersionRange[]]]
}
 
#>



    Import-DscResource -ModuleName PSDesiredStateConfiguration
    Import-DscResource -ModuleName Microsoft365DSC

    $dscResourceName = 'IntuneDeviceCompliancePolicyWindows10'

    $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)
    }
}