Public/Intune/Update-KritTcmDeviceAppManagementAppCategory.ps1

<#
.SYNOPSIS
    Krit.TCM wrapper over Microsoft365DSC helper Update-DeviceAppManagementAppCategory
    (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: Update-DeviceAppManagementAppCategory
    Category: Intune
    Module: M365DSCIntuneUtil
    Params: 3
#>

function Update-KritTcmDeviceAppManagementAppCategory {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)] [Object] $App,
        [Parameter(Mandatory)] [Array] $Categories,
        [SwitchParameter] $Compare
    )

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