Public/Export/Set-KritTcmStringReplacementMap.ps1

<#
.SYNOPSIS
    Krit.TCM wrapper over Microsoft365DSC helper Set-M365DSCStringReplacementMap
    (category: Export, module: M365DSCExportUtil).

.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: Set-M365DSCStringReplacementMap
    Category: Export
    Module: M365DSCExportUtil
    Params: 2
#>

function Set-KritTcmStringReplacementMap {
    [CmdletBinding()]
    param(
        [Hashtable] $Map,
        [SwitchParameter] $Clear
    )

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