Public/Other/Invoke-KriticalUtcmAzureDevOPSWebRequest.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Invoke-M365DSCAzureDevOPSWebRequest
    (category: Other, module: M365DSCAzureDevOPSHelper).

.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: Other
    Module: M365DSCAzureDevOPSHelper
    Params: 4
#>

function Invoke-KriticalUtcmAzureDevOPSWebRequest {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)] [String] $Uri,
        [String] $Method,
        [String] $Body,
        [String] $ContentType
    )

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