DSCResources/cIntuneAppProtectionPolicyAndroid/cIntuneAppProtectionPolicyAndroid.schema.psm1
configuration cIntuneAppProtectionPolicyAndroid { param ( [Parameter()] [hashtable[]] $Items ) <# IntuneAppProtectionPolicyAndroid [String] #ResourceName { DisplayName = [string] [AccessTokens = [string[]]] [AllowedDataStorageLocations = [string[]]] [AllowedInboundDataTransferSources = [string]{ allApps | managedApps | none }] [AllowedOutboundClipboardSharingLevel = [string]{ allApps | blocked | managedApps | managedAppsWithPasteIn }] [AllowedOutboundDataTransferDestinations = [string]{ allApps | managedApps | none }] [AppGroupType = [string]{ allApps | allCoreMicrosoftApps | allMicrosoftApps | selectedPublicApps }] [ApplicationId = [string]] [ApplicationSecret = [PSCredential]] [Apps = [string[]]] [Assignments = [string[]]] [CertificateThumbprint = [string]] [ContactSyncBlocked = [bool]] [Credential = [PSCredential]] [CustomBrowserDisplayName = [string]] [CustomBrowserPackageId = [string]] [DataBackupBlocked = [bool]] [DependsOn = [string[]]] [Description = [string]] [DeviceComplianceRequired = [bool]] [DisableAppEncryptionIfDeviceEncryptionIsEnabled = [bool]] [DisableAppPinIfDevicePinIsSet = [bool]] [EncryptAppData = [bool]] [Ensure = [string]{ Absent | Present }] [ExcludedGroups = [string[]]] [FingerprintBlocked = [bool]] [Id = [string]] [IsAssigned = [bool]] [ManagedBrowser = [string]{ microsoftEdge | notConfigured }] [ManagedBrowserToOpenLinksRequired = [bool]] [ManagedIdentity = [bool]] [MaximumPinRetries = [UInt32]] [MinimumPinLength = [UInt32]] [MinimumRequiredAppVersion = [string]] [MinimumRequiredOSVersion = [string]] [MinimumRequiredPatchVersion = [string]] [MinimumWarningAppVersion = [string]] [MinimumWarningOSVersion = [string]] [MinimumWarningPatchVersion = [string]] [OrganizationalCredentialsRequired = [bool]] [PeriodBeforePinReset = [string]] [PeriodOfflineBeforeAccessCheck = [string]] [PeriodOfflineBeforeWipeIsEnforced = [string]] [PeriodOnlineBeforeAccessCheck = [string]] [PinCharacterSet = [string]{ alphanumericAndSymbol | numeric }] [PinRequired = [bool]] [PrintBlocked = [bool]] [PsDscRunAsCredential = [PSCredential]] [RequireClass3Biometrics = [bool]] [RequirePinAfterBiometricChange = [bool]] [SaveAsBlocked = [bool]] [ScreenCaptureBlocked = [bool]] [SimplePinBlocked = [bool]] [TenantId = [string]] } #> Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName Microsoft365DSC $dscResourceName = 'IntuneAppProtectionPolicyAndroid' $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) } } |