Public/Other/Remove-KriticalUtcmAzureBillingAccountsRoleAssignment.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Remove-M365DSCAzureBillingAccountsRoleAssignment
    (category: Other, module: M365DSCAzureHelper).

.DESCRIPTION
    Thin delegating passthrough — logic stays in Microsoft365DSC upstream;
    Kritical.UTCM provides the friendly namespace + citation registration.

    Install-Module Microsoft365DSC -Scope CurrentUser BEFORE calling.

.NOTES
    Category: Other
    Module: M365DSCAzureHelper
    Params: 2
#>

function Remove-KriticalUtcmAzureBillingAccountsRoleAssignment {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)] [String] $BillingAccountId,
        [Parameter(Mandatory)] [String] $AssignmentId
    )

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