Public/Utility/Clear-KriticalUtcmHostMessageCache.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Clear-M365DSCHostMessageCache
    (category: Utility, module: M365DSCUtil).

.DESCRIPTION
    Thin delegating passthrough — logic stays in Microsoft365DSC upstream;
    Kritical.UTCM provides the friendly namespace + citation registration.

    Install-Module Microsoft365DSC -Scope CurrentUser BEFORE calling.

.NOTES
    Category: Utility
    Module: M365DSCUtil
    Params: 0
#>

function Clear-KriticalUtcmHostMessageCache {
    [CmdletBinding()]
    param()

    if (-not (Get-Command -Name 'Clear-M365DSCHostMessageCache' -ErrorAction SilentlyContinue)) {
        throw '[KriticalUtcm] Clear-M365DSCHostMessageCache not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run'
    }
    try {
        & 'Clear-M365DSCHostMessageCache' @PSBoundParameters
    } catch {
        Write-Error ('[KriticalUtcm/Clear-KriticalUtcmHostMessageCache] ' + 'Clear-M365DSCHostMessageCache' + ' failed: ' + $_.Exception.Message)
        throw
    }
}