Public/Intune/Get-KritTcmIntuneSettingCatalogPolicySetting.ps1

<#
.SYNOPSIS
    Krit.TCM wrapper over Microsoft365DSC helper Get-IntuneSettingCatalogPolicySetting
    (category: Intune, module: M365DSCIntuneUtil).

.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: Get-IntuneSettingCatalogPolicySetting
    Category: Intune
    Module: M365DSCIntuneUtil
    Params: 4
#>

function Get-KritTcmIntuneSettingCatalogPolicySetting {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)] [Hashtable] $DSCParams,
        [String] $TemplateId,
        [Array] $SettingTemplates,
        [SwitchParameter] $ContainsDeviceAndUserSettings
    )

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