public/Update-OSDeployCore.ps1

#Requires -PSEdition Core
#Requires -Version 7.4

function Update-OSDeployCore {
    <#
    .SYNOPSIS
        Updates all OSDeployCore assets: Windows Enterprise ESD files, WinPE Recovery Environment, and WinPE driver packages.
 
    .DESCRIPTION
        Runs Update-OSDeployCoreESD, Update-OSDeployCoreOS, and Update-OSDeployCoreDrivers to refresh all
        local OSDeployCore assets in a single call.
 
    .PARAMETER Force
        Passes -Force to both Update-OSDeployCoreESD and Update-OSDeployCoreDrivers,
        re-downloading files even when a matching cached copy already exists.
 
    .EXAMPLE
        Update-OSDeployCore
 
        Downloads any missing Windows Enterprise ESD files, WinPE Recovery Environment, and WinPE driver packages.
 
    .EXAMPLE
        Update-OSDeployCore -Force
 
        Re-downloads all Windows Enterprise ESD files, WinPE Recovery Environment, and WinPE driver packages regardless
        of whether they are already cached.
 
    .EXAMPLE
        Update-OSDeployCore -WhatIf
 
        Shows what Update-OSDeployCoreESD, Update-OSDeployCoreOS, and Update-OSDeployCoreDrivers would do without
        performing any downloads.
 
    .NOTES
 
    Dependencies:
      Module Functions: Update-OSDeployCoreDrivers, Update-OSDeployCoreESD, Update-OSDeployCoreOS
      Windows Features: Windows ADK WinPE Addon
    #>

    [CmdletBinding(SupportsShouldProcess)]
    param (
        [Parameter()]
        [switch]$Force
    )

    Update-OSDeployCoreESD @PSBoundParameters
    Update-OSDeployCoreOS @PSBoundParameters
    Update-OSDeployCoreDrivers @PSBoundParameters
}