DSCResources/cIntuneWindowsUpdateForBusinessRingUpdateProfileWindows10/cIntuneWindowsUpdateForBusinessRingUpdateProfileWindows10.schema.psm1

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

<#
IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10 [String] #ResourceName
{
    DisplayName = [string]
    [AccessTokens = [string[]]]
    [AllowWindows11Upgrade = [bool]]
    [ApplicationId = [string]]
    [ApplicationSecret = [PSCredential]]
    [Assignments = [MSFT_DeviceManagementConfigurationPolicyAssignments[]]]
    [AutomaticUpdateMode = [string]{ autoInstallAndRebootAtMaintenanceTime | autoInstallAndRebootAtScheduledTime | autoInstallAndRebootWithoutEndUserControl | autoInstallAtMaintenanceTime | notifyDownload | userDefined | windowsDefault }]
    [AutoRestartNotificationDismissal = [string]{ automatic | notConfigured | unknownFutureValue | user }]
    [BusinessReadyUpdatesOnly = [string]{ all | businessReadyOnly | userDefined | windowsInsiderBuildFast | windowsInsiderBuildRelease | windowsInsiderBuildSlow }]
    [CertificateThumbprint = [string]]
    [Credential = [PSCredential]]
    [DeadlineForFeatureUpdatesInDays = [UInt32]]
    [DeadlineForQualityUpdatesInDays = [UInt32]]
    [DeadlineGracePeriodInDays = [UInt32]]
    [DeliveryOptimizationMode = [string]{ bypassMode | httpOnly | httpWithInternetPeering | httpWithPeeringNat | httpWithPeeringPrivateGroup | simpleDownload | userDefined }]
    [DependsOn = [string[]]]
    [Description = [string]]
    [DriversExcluded = [bool]]
    [EngagedRestartDeadlineInDays = [UInt32]]
    [EngagedRestartSnoozeScheduleInDays = [UInt32]]
    [EngagedRestartTransitionScheduleInDays = [UInt32]]
    [Ensure = [string]{ Absent | Present }]
    [FeatureUpdatesDeferralPeriodInDays = [UInt32]]
    [FeatureUpdatesPaused = [bool]]
    [FeatureUpdatesPauseExpiryDateTime = [string]]
    [FeatureUpdatesPauseStartDate = [string]]
    [FeatureUpdatesRollbackStartDateTime = [string]]
    [FeatureUpdatesRollbackWindowInDays = [UInt32]]
    [Id = [string]]
    [InstallationSchedule = [MSFT_MicrosoftGraphwindowsUpdateInstallScheduleType]]
    [ManagedIdentity = [bool]]
    [MicrosoftUpdateServiceAllowed = [bool]]
    [PostponeRebootUntilAfterDeadline = [bool]]
    [PrereleaseFeatures = [string]{ notAllowed | settingsAndExperimentations | settingsOnly | userDefined }]
    [PsDscRunAsCredential = [PSCredential]]
    [QualityUpdatesDeferralPeriodInDays = [UInt32]]
    [QualityUpdatesPaused = [bool]]
    [QualityUpdatesPauseExpiryDateTime = [string]]
    [QualityUpdatesPauseStartDate = [string]]
    [QualityUpdatesRollbackStartDateTime = [string]]
    [ScheduleImminentRestartWarningInMinutes = [UInt32]]
    [ScheduleRestartWarningInHours = [UInt32]]
    [SkipChecksBeforeRestart = [bool]]
    [TenantId = [string]]
    [UpdateNotificationLevel = [string]{ defaultNotifications | disableAllNotifications | notConfigured | restartWarningsOnly | unknownFutureValue }]
    [UpdateWeeks = [string]{ everyWeek | firstWeek | fourthWeek | secondWeek | thirdWeek | unknownFutureValue | userDefined }]
    [UserPauseAccess = [string]{ disabled | enabled | notConfigured }]
    [UserWindowsUpdateScanAccess = [string]{ disabled | enabled | notConfigured }]
}
 
#>



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

    $dscResourceName = 'IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10'

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