Public/Graph/Invoke-KriticalUtcmGraphShimWriteResource.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Invoke-M365DSCGraphShimWriteResource
    (category: Graph, module: M365DSCGraphShim).

.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: Graph
    Module: M365DSCGraphShim
    Params: 4
#>

function Invoke-KriticalUtcmGraphShimWriteResource {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)] [IDictionary] $BoundParameters,
        [Parameter(Mandatory)] [String] $Uri,
        [Parameter(Mandatory)] [String] $Method,
        [String[]] $ExtraExcludeParams
    )

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