Public/Logging/Get-KriticalUtcmNotificationEndpointRegistration.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Get-M365DSCNotificationEndpointRegistration
    (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 Get-KriticalUtcmNotificationEndpointRegistration {
    [CmdletBinding()]
    param(
        [String] $Url,
        [String] $EventType
    )

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