Public/Module/Uninstall-KritTcmOutdatedDependencies.ps1

<#
.SYNOPSIS
    Krit.TCM wrapper over Microsoft365DSC helper Uninstall-M365DSCOutdatedDependencies
    (category: Module, module: M365DSCModuleMgmt).

.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: Uninstall-M365DSCOutdatedDependencies
    Category: Module
    Module: M365DSCModuleMgmt
    Params: 0
#>

function Uninstall-KritTcmOutdatedDependencies {
    [CmdletBinding()]
    param()

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