DSCResources/cIntuneDeviceConfigurationPolicyAndroidDeviceOwner/cIntuneDeviceConfigurationPolicyAndroidDeviceOwner.schema.psm1

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

<#
IntuneDeviceConfigurationPolicyAndroidDeviceOwner [String] #ResourceName
{
    DisplayName = [string]
    [AccessTokens = [string[]]]
    [AccountsBlockModification = [bool]]
    [ApplicationId = [string]]
    [ApplicationSecret = [PSCredential]]
    [AppsAllowInstallFromUnknownSources = [bool]]
    [AppsAutoUpdatePolicy = [string]{ always | never | notConfigured | userChoice | wiFiOnly }]
    [AppsDefaultPermissionPolicy = [string]{ autoDeny | autoGrant | deviceDefault | prompt }]
    [AppsRecommendSkippingFirstUseHints = [bool]]
    [Assignments = [MSFT_DeviceManagementConfigurationPolicyAssignments[]]]
    [AzureAdSharedDeviceDataClearApps = [MSFT_MicrosoftGraphapplistitem[]]]
    [BluetoothBlockConfiguration = [bool]]
    [BluetoothBlockContactSharing = [bool]]
    [CameraBlocked = [bool]]
    [CellularBlockWiFiTethering = [bool]]
    [CertificateCredentialConfigurationDisabled = [bool]]
    [CertificateThumbprint = [string]]
    [Credential = [PSCredential]]
    [CrossProfilePoliciesAllowCopyPaste = [bool]]
    [CrossProfilePoliciesAllowDataSharing = [string]{ crossProfileDataSharingAllowed | crossProfileDataSharingBlocked | dataSharingFromWorkToPersonalBlocked | notConfigured | unkownFutureValue }]
    [CrossProfilePoliciesShowWorkContactsInPersonalProfile = [bool]]
    [DataRoamingBlocked = [bool]]
    [DateTimeConfigurationBlocked = [bool]]
    [DependsOn = [string[]]]
    [Description = [string]]
    [DetailedHelpText = [MSFT_MicrosoftGraphandroiddeviceowneruserfacingmessage]]
    [DeviceOwnerLockScreenMessage = [MSFT_MicrosoftGraphandroiddeviceowneruserfacingmessage]]
    [EnrollmentProfile = [string]{ dedicatedDevice | fullyManaged | notConfigured }]
    [Ensure = [string]{ Absent | Present }]
    [FactoryResetBlocked = [bool]]
    [FactoryResetDeviceAdministratorEmails = [string[]]]
    [GlobalProxy = [MSFT_MicrosoftGraphandroiddeviceownerglobalproxy]]
    [GoogleAccountsBlocked = [bool]]
    [Id = [string]]
    [KioskCustomizationDeviceSettingsBlocked = [bool]]
    [KioskCustomizationPowerButtonActionsBlocked = [bool]]
    [KioskCustomizationStatusBar = [string]{ notConfigured | notificationsAndSystemInfoEnabled | systemInfoOnly }]
    [KioskCustomizationSystemErrorWarnings = [bool]]
    [KioskCustomizationSystemNavigation = [string]{ homeButtonOnly | navigationEnabled | notConfigured }]
    [KioskModeAppOrderEnabled = [bool]]
    [KioskModeAppPositions = [MSFT_MicrosoftGraphandroiddeviceownerkioskmodeapppositionitem[]]]
    [KioskModeApps = [MSFT_MicrosoftGraphapplistitem[]]]
    [KioskModeAppsInFolderOrderedByName = [bool]]
    [KioskModeBluetoothConfigurationEnabled = [bool]]
    [KioskModeDebugMenuEasyAccessEnabled = [bool]]
    [KioskModeExitCode = [string]]
    [KioskModeFlashlightConfigurationEnabled = [bool]]
    [KioskModeFolderIcon = [string]{ darkCircle | darkSquare | lightCircle | lightSquare | notConfigured }]
    [KioskModeGridHeight = [UInt32]]
    [KioskModeGridWidth = [UInt32]]
    [KioskModeIconSize = [string]{ large | largest | notConfigured | regular | small | smallest }]
    [KioskModeLockHomeScreen = [bool]]
    [KioskModeManagedFolders = [MSFT_MicrosoftGraphandroiddeviceownerkioskmodemanagedfolder[]]]
    [KioskModeManagedHomeScreenAutoSignout = [bool]]
    [KioskModeManagedHomeScreenInactiveSignOutDelayInSeconds = [UInt32]]
    [KioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds = [UInt32]]
    [KioskModeManagedHomeScreenPinComplexity = [string]{ complex | notConfigured | simple }]
    [KioskModeManagedHomeScreenPinRequired = [bool]]
    [KioskModeManagedHomeScreenPinRequiredToResume = [bool]]
    [KioskModeManagedHomeScreenSignInBackground = [string]]
    [KioskModeManagedHomeScreenSignInBrandingLogo = [string]]
    [KioskModeManagedHomeScreenSignInEnabled = [bool]]
    [KioskModeManagedSettingsEntryDisabled = [bool]]
    [KioskModeMediaVolumeConfigurationEnabled = [bool]]
    [KioskModeScreenOrientation = [string]{ autoRotate | landscape | notConfigured | portrait }]
    [KioskModeScreenSaverConfigurationEnabled = [bool]]
    [KioskModeScreenSaverDetectMediaDisabled = [bool]]
    [KioskModeScreenSaverDisplayTimeInSeconds = [UInt32]]
    [KioskModeScreenSaverImageUrl = [string]]
    [KioskModeScreenSaverStartDelayInSeconds = [UInt32]]
    [KioskModeShowAppNotificationBadge = [bool]]
    [KioskModeShowDeviceInfo = [bool]]
    [KioskModeUseManagedHomeScreenApp = [string]{ multiAppMode | notConfigured | singleAppMode }]
    [KioskModeVirtualHomeButtonEnabled = [bool]]
    [KioskModeVirtualHomeButtonType = [string]{ floating | notConfigured | swipeUp }]
    [KioskModeWallpaperUrl = [string]]
    [KioskModeWifiAllowedSsids = [string[]]]
    [KioskModeWiFiConfigurationEnabled = [bool]]
    [ManagedIdentity = [bool]]
    [MicrophoneForceMute = [bool]]
    [MicrosoftLauncherConfigurationEnabled = [bool]]
    [MicrosoftLauncherCustomWallpaperAllowUserModification = [bool]]
    [MicrosoftLauncherCustomWallpaperEnabled = [bool]]
    [MicrosoftLauncherCustomWallpaperImageUrl = [string]]
    [MicrosoftLauncherDockPresenceAllowUserModification = [bool]]
    [MicrosoftLauncherDockPresenceConfiguration = [string]{ disabled | hide | notConfigured | show }]
    [MicrosoftLauncherFeedAllowUserModification = [bool]]
    [MicrosoftLauncherFeedEnabled = [bool]]
    [MicrosoftLauncherSearchBarPlacementConfiguration = [string]{ bottom | hide | notConfigured | top }]
    [NetworkEscapeHatchAllowed = [bool]]
    [NfcBlockOutgoingBeam = [bool]]
    [PasswordBlockKeyguard = [bool]]
    [PasswordBlockKeyguardFeatures = [string[]]{ allFeatures | biometrics | camera | face | fingerprint | iris | notConfigured | notifications | remoteInput | trustAgents | unredactedNotifications }]
    [PasswordExpirationDays = [UInt32]]
    [PasswordMinimumLength = [UInt32]]
    [PasswordMinimumLetterCharacters = [UInt32]]
    [PasswordMinimumLowerCaseCharacters = [UInt32]]
    [PasswordMinimumNonLetterCharacters = [UInt32]]
    [PasswordMinimumNumericCharacters = [UInt32]]
    [PasswordMinimumSymbolCharacters = [UInt32]]
    [PasswordMinimumUpperCaseCharacters = [UInt32]]
    [PasswordMinutesOfInactivityBeforeScreenTimeout = [UInt32]]
    [PasswordPreviousPasswordCountToBlock = [UInt32]]
    [PasswordRequiredType = [string]{ alphabetic | alphanumeric | alphanumericWithSymbols | customPassword | deviceDefault | lowSecurityBiometric | numeric | numericComplex | required }]
    [PasswordRequireUnlock = [string]{ daily | deviceDefault | unkownFutureValue }]
    [PasswordSignInFailureCountBeforeFactoryReset = [UInt32]]
    [PersonalProfileAppsAllowInstallFromUnknownSources = [bool]]
    [PersonalProfileCameraBlocked = [bool]]
    [PersonalProfilePersonalApplications = [MSFT_MicrosoftGraphapplistitem[]]]
    [PersonalProfilePlayStoreMode = [string]{ allowedApps | blockedApps | notConfigured }]
    [PersonalProfileScreenCaptureBlocked = [bool]]
    [PlayStoreMode = [string]{ allowList | blockList | notConfigured }]
    [PsDscRunAsCredential = [PSCredential]]
    [ScreenCaptureBlocked = [bool]]
    [SecurityCommonCriteriaModeEnabled = [bool]]
    [SecurityDeveloperSettingsEnabled = [bool]]
    [SecurityRequireVerifyApps = [bool]]
    [ShortHelpText = [MSFT_MicrosoftGraphandroiddeviceowneruserfacingmessage]]
    [StatusBarBlocked = [bool]]
    [StayOnModes = [string[]]{ ac | notConfigured | usb | wireless }]
    [StorageAllowUsb = [bool]]
    [StorageBlockExternalMedia = [bool]]
    [StorageBlockUsbFileTransfer = [bool]]
    [SystemUpdateFreezePeriods = [MSFT_MicrosoftGraphandroiddeviceownersystemupdatefreezeperiod[]]]
    [SystemUpdateInstallType = [string]{ automatic | deviceDefault | postpone | windowed }]
    [SystemUpdateWindowEndMinutesAfterMidnight = [UInt32]]
    [SystemUpdateWindowStartMinutesAfterMidnight = [UInt32]]
    [SystemWindowsBlocked = [bool]]
    [TenantId = [string]]
    [UsersBlockAdd = [bool]]
    [UsersBlockRemove = [bool]]
    [VolumeBlockAdjustment = [bool]]
    [VpnAlwaysOnLockdownMode = [bool]]
    [VpnAlwaysOnPackageIdentifier = [string]]
    [WifiBlockEditConfigurations = [bool]]
    [WifiBlockEditPolicyDefinedConfigurations = [bool]]
    [WorkProfilePasswordExpirationDays = [UInt32]]
    [WorkProfilePasswordMinimumLength = [UInt32]]
    [WorkProfilePasswordMinimumLetterCharacters = [UInt32]]
    [WorkProfilePasswordMinimumLowerCaseCharacters = [UInt32]]
    [WorkProfilePasswordMinimumNonLetterCharacters = [UInt32]]
    [WorkProfilePasswordMinimumNumericCharacters = [UInt32]]
    [WorkProfilePasswordMinimumSymbolCharacters = [UInt32]]
    [WorkProfilePasswordMinimumUpperCaseCharacters = [UInt32]]
    [WorkProfilePasswordPreviousPasswordCountToBlock = [UInt32]]
    [WorkProfilePasswordRequiredType = [string]{ alphabetic | alphanumeric | alphanumericWithSymbols | customPassword | deviceDefault | lowSecurityBiometric | numeric | numericComplex | required }]
    [WorkProfilePasswordRequireUnlock = [string]{ daily | deviceDefault | unkownFutureValue }]
    [WorkProfilePasswordSignInFailureCountBeforeFactoryReset = [UInt32]]
}
 
#>



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

    $dscResourceName = 'IntuneDeviceConfigurationPolicyAndroidDeviceOwner'

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