DSCResources/cIntuneDeviceConfigurationPolicyIOS/cIntuneDeviceConfigurationPolicyIOS.schema.psm1

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

<#
IntuneDeviceConfigurationPolicyIOS [String] #ResourceName
{
    DisplayName = [string]
    [AccessTokens = [string[]]]
    [AccountBlockModification = [bool]]
    [ActivationLockAllowWhenSupervised = [bool]]
    [AirDropBlocked = [bool]]
    [AirDropForceUnmanagedDropTarget = [bool]]
    [AirPlayForcePairingPasswordForOutgoingRequests = [bool]]
    [AirPrintBlockCredentialsStorage = [bool]]
    [AirPrintBlocked = [bool]]
    [AirPrintBlockiBeaconDiscovery = [bool]]
    [AirPrintForceTrustedTLS = [bool]]
    [AppClipsBlocked = [bool]]
    [AppleNewsBlocked = [bool]]
    [ApplePersonalizedAdsBlocked = [bool]]
    [AppleWatchBlockPairing = [bool]]
    [AppleWatchForceWristDetection = [bool]]
    [ApplicationId = [string]]
    [ApplicationSecret = [PSCredential]]
    [AppRemovalBlocked = [bool]]
    [AppsSingleAppModeList = [MSFT_MicrosoftGraphapplistitem[]]]
    [AppStoreBlockAutomaticDownloads = [bool]]
    [AppStoreBlocked = [bool]]
    [AppStoreBlockInAppPurchases = [bool]]
    [AppStoreBlockUIAppInstallation = [bool]]
    [AppStoreRequirePassword = [bool]]
    [AppsVisibilityList = [MSFT_MicrosoftGraphapplistitem[]]]
    [AppsVisibilityListType = [string]{ appsInListCompliant | appsNotInListCompliant | none }]
    [Assignments = [MSFT_DeviceManagementConfigurationPolicyAssignments[]]]
    [AutoFillForceAuthentication = [bool]]
    [AutoUnlockBlocked = [bool]]
    [BlockSystemAppRemoval = [bool]]
    [BluetoothBlockModification = [bool]]
    [CameraBlocked = [bool]]
    [CellularBlockDataRoaming = [bool]]
    [CellularBlockGlobalBackgroundFetchWhileRoaming = [bool]]
    [CellularBlockPerAppDataModification = [bool]]
    [CellularBlockPersonalHotspot = [bool]]
    [CellularBlockPersonalHotspotModification = [bool]]
    [CellularBlockPlanModification = [bool]]
    [CellularBlockVoiceRoaming = [bool]]
    [CertificatesBlockUntrustedTlsCertificates = [bool]]
    [CertificateThumbprint = [string]]
    [ClassroomAppBlockRemoteScreenObservation = [bool]]
    [ClassroomAppForceUnpromptedScreenObservation = [bool]]
    [ClassroomForceAutomaticallyJoinClasses = [bool]]
    [ClassroomForceRequestPermissionToLeaveClasses = [bool]]
    [ClassroomForceUnpromptedAppAndDeviceLock = [bool]]
    [CompliantAppListType = [string]{ appsInListCompliant | appsNotInListCompliant | none }]
    [CompliantAppsList = [MSFT_MicrosoftGraphapplistitem[]]]
    [ConfigurationProfileBlockChanges = [bool]]
    [ContactsAllowManagedToUnmanagedWrite = [bool]]
    [ContactsAllowUnmanagedToManagedRead = [bool]]
    [ContinuousPathKeyboardBlocked = [bool]]
    [Credential = [PSCredential]]
    [DateAndTimeForceSetAutomatically = [bool]]
    [DefinitionLookupBlocked = [bool]]
    [DependsOn = [string[]]]
    [Description = [string]]
    [DeviceBlockEnableRestrictions = [bool]]
    [DeviceBlockEraseContentAndSettings = [bool]]
    [DeviceBlockNameModification = [bool]]
    [DiagnosticDataBlockSubmission = [bool]]
    [DiagnosticDataBlockSubmissionModification = [bool]]
    [DocumentsBlockManagedDocumentsInUnmanagedApps = [bool]]
    [DocumentsBlockUnmanagedDocumentsInManagedApps = [bool]]
    [EmailInDomainSuffixes = [string[]]]
    [Ensure = [string]{ Absent | Present }]
    [EnterpriseAppBlockTrust = [bool]]
    [EnterpriseAppBlockTrustModification = [bool]]
    [EnterpriseBookBlockBackup = [bool]]
    [EnterpriseBookBlockMetadataSync = [bool]]
    [EsimBlockModification = [bool]]
    [FaceTimeBlocked = [bool]]
    [FilesNetworkDriveAccessBlocked = [bool]]
    [FilesUsbDriveAccessBlocked = [bool]]
    [FindMyDeviceInFindMyAppBlocked = [bool]]
    [FindMyFriendsBlocked = [bool]]
    [FindMyFriendsInFindMyAppBlocked = [bool]]
    [GameCenterBlocked = [bool]]
    [GamingBlockGameCenterFriends = [bool]]
    [GamingBlockMultiplayer = [bool]]
    [HostPairingBlocked = [bool]]
    [IBooksStoreBlocked = [bool]]
    [IBooksStoreBlockErotica = [bool]]
    [ICloudBlockActivityContinuation = [bool]]
    [ICloudBlockBackup = [bool]]
    [ICloudBlockDocumentSync = [bool]]
    [ICloudBlockManagedAppsSync = [bool]]
    [ICloudBlockPhotoLibrary = [bool]]
    [ICloudBlockPhotoStreamSync = [bool]]
    [ICloudBlockSharedPhotoStream = [bool]]
    [ICloudPrivateRelayBlocked = [bool]]
    [ICloudRequireEncryptedBackup = [bool]]
    [Id = [string]]
    [ITunesBlocked = [bool]]
    [ITunesBlockExplicitContent = [bool]]
    [ITunesBlockMusicService = [bool]]
    [ITunesBlockRadio = [bool]]
    [KeyboardBlockAutoCorrect = [bool]]
    [KeyboardBlockDictation = [bool]]
    [KeyboardBlockPredictive = [bool]]
    [KeyboardBlockShortcuts = [bool]]
    [KeyboardBlockSpellCheck = [bool]]
    [KeychainBlockCloudSync = [bool]]
    [KioskModeAllowAssistiveSpeak = [bool]]
    [KioskModeAllowAssistiveTouchSettings = [bool]]
    [KioskModeAllowAutoLock = [bool]]
    [KioskModeAllowColorInversionSettings = [bool]]
    [KioskModeAllowRingerSwitch = [bool]]
    [KioskModeAllowScreenRotation = [bool]]
    [KioskModeAllowSleepButton = [bool]]
    [KioskModeAllowTouchscreen = [bool]]
    [KioskModeAllowVoiceControlModification = [bool]]
    [KioskModeAllowVoiceOverSettings = [bool]]
    [KioskModeAllowVolumeButtons = [bool]]
    [KioskModeAllowZoomSettings = [bool]]
    [KioskModeAppStoreUrl = [string]]
    [KioskModeAppType = [string]{ appStoreApp | builtInApp | managedApp | notConfigured }]
    [KioskModeBlockAutoLock = [bool]]
    [KioskModeBlockRingerSwitch = [bool]]
    [KioskModeBlockScreenRotation = [bool]]
    [KioskModeBlockSleepButton = [bool]]
    [KioskModeBlockTouchscreen = [bool]]
    [KioskModeBlockVolumeButtons = [bool]]
    [KioskModeBuiltInAppId = [string]]
    [KioskModeEnableVoiceControl = [bool]]
    [KioskModeManagedAppId = [string]]
    [KioskModeRequireAssistiveTouch = [bool]]
    [KioskModeRequireColorInversion = [bool]]
    [KioskModeRequireMonoAudio = [bool]]
    [KioskModeRequireVoiceOver = [bool]]
    [KioskModeRequireZoom = [bool]]
    [LockScreenBlockControlCenter = [bool]]
    [LockScreenBlockNotificationView = [bool]]
    [LockScreenBlockPassbook = [bool]]
    [LockScreenBlockTodayView = [bool]]
    [ManagedIdentity = [bool]]
    [ManagedPasteboardRequired = [bool]]
    [MediaContentRatingApps = [string]{ agesAbove12 | agesAbove17 | agesAbove4 | agesAbove9 | allAllowed | allBlocked }]
    [MediaContentRatingAustralia = [MSFT_MicrosoftGraphmediacontentratingaustralia]]
    [MediaContentRatingCanada = [MSFT_MicrosoftGraphmediacontentratingcanada]]
    [MediaContentRatingFrance = [MSFT_MicrosoftGraphmediacontentratingfrance]]
    [MediaContentRatingGermany = [MSFT_MicrosoftGraphmediacontentratinggermany]]
    [MediaContentRatingIreland = [MSFT_MicrosoftGraphmediacontentratingireland]]
    [MediaContentRatingJapan = [MSFT_MicrosoftGraphmediacontentratingjapan]]
    [MediaContentRatingNewZealand = [MSFT_MicrosoftGraphmediacontentratingnewzealand]]
    [MediaContentRatingUnitedKingdom = [MSFT_MicrosoftGraphmediacontentratingunitedkingdom]]
    [MediaContentRatingUnitedStates = [MSFT_MicrosoftGraphmediacontentratingunitedstates]]
    [MessagesBlocked = [bool]]
    [NetworkUsageRules = [MSFT_MicrosoftGraphiosnetworkusagerule[]]]
    [NfcBlocked = [bool]]
    [NotificationsBlockSettingsModification = [bool]]
    [OnDeviceOnlyDictationForced = [bool]]
    [OnDeviceOnlyTranslationForced = [bool]]
    [PasscodeBlockFingerprintModification = [bool]]
    [PasscodeBlockFingerprintUnlock = [bool]]
    [PasscodeBlockModification = [bool]]
    [PasscodeBlockSimple = [bool]]
    [PasscodeExpirationDays = [UInt32]]
    [PasscodeMinimumCharacterSetCount = [UInt32]]
    [PasscodeMinimumLength = [UInt32]]
    [PasscodeMinutesOfInactivityBeforeLock = [UInt32]]
    [PasscodeMinutesOfInactivityBeforeScreenTimeout = [UInt32]]
    [PasscodePreviousPasscodeBlockCount = [UInt32]]
    [PasscodeRequired = [bool]]
    [PasscodeRequiredType = [string]{ alphanumeric | deviceDefault | numeric }]
    [PasscodeSignInFailureCountBeforeWipe = [UInt32]]
    [PasswordBlockAirDropSharing = [bool]]
    [PasswordBlockAutoFill = [bool]]
    [PasswordBlockProximityRequests = [bool]]
    [PkiBlockOTAUpdates = [bool]]
    [PodcastsBlocked = [bool]]
    [PrivacyForceLimitAdTracking = [bool]]
    [ProximityBlockSetupToNewDevice = [bool]]
    [PsDscRunAsCredential = [PSCredential]]
    [SafariBlockAutofill = [bool]]
    [SafariBlocked = [bool]]
    [SafariBlockJavaScript = [bool]]
    [SafariBlockPopups = [bool]]
    [SafariCookieSettings = [string]{ allowAlways | allowCurrentWebSite | allowFromWebsitesVisited | blockAlways | browserDefault }]
    [SafariManagedDomains = [string[]]]
    [SafariPasswordAutoFillDomains = [string[]]]
    [SafariRequireFraudWarning = [bool]]
    [ScreenCaptureBlocked = [bool]]
    [SharedDeviceBlockTemporarySessions = [bool]]
    [SiriBlocked = [bool]]
    [SiriBlockedWhenLocked = [bool]]
    [SiriBlockUserGeneratedContent = [bool]]
    [SiriRequireProfanityFilter = [bool]]
    [SoftwareUpdatesEnforcedDelayInDays = [UInt32]]
    [SoftwareUpdatesForceDelayed = [bool]]
    [SpotlightBlockInternetResults = [bool]]
    [TenantId = [string]]
    [UnpairedExternalBootToRecoveryAllowed = [bool]]
    [UsbRestrictedModeBlocked = [bool]]
    [VoiceDialingBlocked = [bool]]
    [VpnBlockCreation = [bool]]
    [WallpaperBlockModification = [bool]]
    [WiFiConnectOnlyToConfiguredNetworks = [bool]]
    [WiFiConnectToAllowedNetworksOnlyForced = [bool]]
    [WifiPowerOnForced = [bool]]
}
 
#>



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

    $dscResourceName = 'IntuneDeviceConfigurationPolicyIOS'

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