Public/Module/Test-KriticalUtcmModuleValidity.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Test-M365DSCModuleValidity
    (category: Module, module: M365DSCModuleMgmt).

.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: Module
    Module: M365DSCModuleMgmt
    Params: 0
#>

function Test-KriticalUtcmModuleValidity {
    [CmdletBinding()]
    param()

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