DSCResources/cIntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled/cIntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled.schema.psm1
configuration cIntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled { param ( [Parameter()] [hashtable[]] $Items ) <# IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled [String] #ResourceName { DisplayName = [string] [AccessTokens = [string[]]] [ApplicationId = [string]] [ApplicationSecret = [PSCredential]] [Assignments = [MSFT_IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolledPolicyAssignments[]]] [AzureRightsManagementServicesAllowed = [bool]] [CertificateThumbprint = [string]] [Credential = [PSCredential]] [DataRecoveryCertificate = [MSFT_MicrosoftGraphwindowsInformationProtectionDataRecoveryCertificate]] [DependsOn = [string[]]] [Description = [string]] [EnforcementLevel = [string]{ encryptAndAuditOnly | encryptAuditAndBlock | encryptAuditAndPrompt | noProtection }] [Ensure = [string]{ Absent | Present }] [EnterpriseDomain = [string]] [EnterpriseInternalProxyServers = [MSFT_MicrosoftGraphwindowsInformationProtectionResourceCollection[]]] [EnterpriseIPRanges = [MSFT_MicrosoftGraphwindowsInformationProtectionIPRangeCollection[]]] [EnterpriseIPRangesAreAuthoritative = [bool]] [EnterpriseNetworkDomainNames = [MSFT_MicrosoftGraphwindowsInformationProtectionResourceCollection[]]] [EnterpriseProtectedDomainNames = [MSFT_MicrosoftGraphwindowsInformationProtectionResourceCollection[]]] [EnterpriseProxiedDomains = [MSFT_MicrosoftGraphwindowsInformationProtectionProxiedDomainCollection[]]] [EnterpriseProxyServers = [MSFT_MicrosoftGraphwindowsInformationProtectionResourceCollection[]]] [EnterpriseProxyServersAreAuthoritative = [bool]] [ExemptApps = [MSFT_MicrosoftGraphwindowsInformationProtectionApp[]]] [IconsVisible = [bool]] [Id = [string]] [IndexingEncryptedStoresOrItemsBlocked = [bool]] [ManagedIdentity = [bool]] [NeutralDomainResources = [MSFT_MicrosoftGraphwindowsInformationProtectionResourceCollection[]]] [ProtectedApps = [MSFT_MicrosoftGraphwindowsInformationProtectionApp[]]] [ProtectionUnderLockConfigRequired = [bool]] [PsDscRunAsCredential = [PSCredential]] [RevokeOnUnenrollDisabled = [bool]] [RightsManagementServicesTemplateId = [string]] [SmbAutoEncryptedFileExtensions = [MSFT_MicrosoftGraphwindowsInformationProtectionResourceCollection[]]] [TenantId = [string]] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'IntuneWindowsInformationProtectionPolicyWindows10MdmEnrolled' $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) } } |