Public/Compare/Compare-KritTcmResourceState.ps1

<#
.SYNOPSIS
    Krit.TCM wrapper over Microsoft365DSC helper Compare-M365DSCResourceState
    (category: Compare, module: M365DSCCompare).

.DESCRIPTION
    Auto-scaffolded wave .1514 by New-KritTcmFromM365DscHelpers.ps1.
    Thin delegating passthrough — logic stays in Microsoft365DSC upstream;
    Krit.TCM provides the friendly namespace + citation registration
    for HARD RULE 20 discipline.

    Install-Module Microsoft365DSC -Scope CurrentUser BEFORE calling.

.NOTES
    Wave .1514. Underlying cmdlet: Compare-M365DSCResourceState
    Category: Compare
    Module: M365DSCCompare
    Params: 7
#>

function Compare-KritTcmResourceState {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)] [String] $ResourceName,
        [Parameter(Mandatory)] [Hashtable] $DesiredValues,
        [Parameter(Mandatory)] [Hashtable] $CurrentValues,
        [String[]] $ExcludedProperties,
        [String[]] $IncludedProperties,
        [Func`5] $PostProcessing,
        [Object[]] $PostProcessingArgs
    )

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