Public/Logging/Send-KriticalUtcmNotificationEndPointMessage.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Send-M365DSCNotificationEndPointMessage
    (category: Logging, module: M365DSCLogEngine).

.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: Logging
    Module: M365DSCLogEngine
    Params: 2
#>

function Send-KriticalUtcmNotificationEndPointMessage {
    [CmdletBinding()]
    param(
        [String] $EventDetails,
        [String] $EventType
    )

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