DSCResources/cIntuneDiskEncryptionWindows10/cIntuneDiskEncryptionWindows10.schema.psm1

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

<#
IntuneDiskEncryptionWindows10 [String] #ResourceName
{
    DisplayName = [string]
    [AccessTokens = [string[]]]
    [AllowStandardUserEncryption = [string]{ 0 | 1 }]
    [AllowWarningForOtherDiskEncryption = [string]{ 0 | 1 }]
    [ApplicationId = [string]]
    [ApplicationSecret = [PSCredential]]
    [Assignments = [MSFT_DeviceManagementConfigurationPolicyAssignments[]]]
    [CertificateThumbprint = [string]]
    [ConfigureAdvancedStartup_Name = [string]{ 0 | 1 }]
    [ConfigureNonTPMStartupKeyUsage_Name = [string]{ 0 | 1 }]
    [ConfigurePINUsageDropDown_Name = [string]{ 0 | 1 | 2 }]
    [ConfigureRecoveryPasswordRotation = [string]{ 0 | 1 | 2 }]
    [ConfigureTPMPINKeyUsageDropDown_Name = [string]{ 0 | 1 | 2 }]
    [ConfigureTPMStartupKeyUsageDropDown_Name = [string]{ 0 | 1 | 2 }]
    [ConfigureTPMUsageDropDown_Name = [string]{ 0 | 1 | 2 }]
    [Credential = [PSCredential]]
    [DependsOn = [string[]]]
    [Description = [string]]
    [DisallowStandardUsersCanChangePIN_Name = [string]{ 0 | 1 }]
    [EnablePrebootInputProtectorsOnSlates_Name = [string]{ 0 | 1 }]
    [EnablePreBootPinExceptionOnDECapableDevice_Name = [string]{ 0 | 1 }]
    [EncryptionMethodWithXts_Name = [string]{ 0 | 1 }]
    [EncryptionMethodWithXtsFdvDropDown_Name = [string]{ 3 | 4 | 6 | 7 }]
    [EncryptionMethodWithXtsOsDropDown_Name = [string]{ 3 | 4 | 6 | 7 }]
    [EncryptionMethodWithXtsRdvDropDown_Name = [string]{ 3 | 4 | 6 | 7 }]
    [EnhancedPIN_Name = [string]{ 0 | 1 }]
    [Ensure = [string]{ Absent | Present }]
    [FDVActiveDirectoryBackup_Name = [string]{ 0 | 1 }]
    [FDVActiveDirectoryBackupDropDown_Name = [string]{ 1 | 2 }]
    [FDVAllowDRA_Name = [string]{ 0 | 1 }]
    [FDVDenyWriteAccess_Name = [string]{ 0 | 1 }]
    [FDVEncryptionType_Name = [string]{ 0 | 1 }]
    [FDVEncryptionTypeDropDown_Name = [string]{ 0 | 1 | 2 }]
    [FDVHideRecoveryPage_Name = [string]{ 0 | 1 }]
    [FDVRecoveryKeyUsageDropDown_Name = [string]{ 0 | 1 | 2 }]
    [FDVRecoveryPasswordUsageDropDown_Name = [string]{ 0 | 1 | 2 }]
    [FDVRecoveryUsage_Name = [string]{ 0 | 1 }]
    [FDVRequireActiveDirectoryBackup_Name = [string]{ 0 | 1 }]
    [Id = [string]]
    [IdentificationField = [string]]
    [IdentificationField_Name = [string]{ 0 | 1 }]
    [ManagedIdentity = [bool]]
    [MinimumPINLength_Name = [string]{ 0 | 1 }]
    [MinPINLength = [Int32]]
    [OSActiveDirectoryBackup_Name = [string]{ 0 | 1 }]
    [OSActiveDirectoryBackupDropDown_Name = [string]{ 1 | 2 }]
    [OSAllowDRA_Name = [string]{ 0 | 1 }]
    [OSEncryptionType_Name = [string]{ 0 | 1 }]
    [OSEncryptionTypeDropDown_Name = [string]{ 0 | 1 | 2 }]
    [OSHideRecoveryPage_Name = [string]{ 0 | 1 }]
    [OSRecoveryKeyUsageDropDown_Name = [string]{ 0 | 1 | 2 }]
    [OSRecoveryPasswordUsageDropDown_Name = [string]{ 0 | 1 | 2 }]
    [OSRecoveryUsage_Name = [string]{ 0 | 1 }]
    [OSRequireActiveDirectoryBackup_Name = [string]{ 0 | 1 }]
    [PrebootRecoveryInfo_Name = [string]{ 0 | 1 }]
    [PrebootRecoveryInfoDropDown_Name = [string]{ 0 | 1 | 2 | 3 }]
    [PsDscRunAsCredential = [PSCredential]]
    [RDVAllowBDE_Name = [string]{ 0 | 1 }]
    [RDVConfigureBDE = [string]{ 0 | 1 }]
    [RDVCrossOrg = [string]{ 0 | 1 }]
    [RDVDenyWriteAccess_Name = [string]{ 0 | 1 }]
    [RDVDisableBDE_Name = [string]{ 0 | 1 }]
    [RDVEncryptionType_Name = [string]{ 0 | 1 }]
    [RDVEncryptionTypeDropDown_Name = [string]{ 0 | 1 | 2 }]
    [RecoveryMessage_Input = [string]]
    [RecoveryUrl_Input = [string]]
    [RequireDeviceEncryption = [string]{ 0 | 1 }]
    [RoleScopeTagIds = [string[]]]
    [SecIdentificationField = [string]]
    [TenantId = [string]]
}
 
#>



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

    $dscResourceName = 'IntuneDiskEncryptionWindows10'

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