Public/Agent/Test-KriticalUtcmAgent.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Test-M365DSCAgent
    (category: Agent, module: M365DSCAgent).

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

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

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