Public/Other/New-KriticalUtcmAzureBillingAccountsAssociatedTenant.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper New-M365DSCAzureBillingAccountsAssociatedTenant
    (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: 3
#>

function New-KriticalUtcmAzureBillingAccountsAssociatedTenant {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)] [String] $BillingAccountId,
        [Parameter(Mandatory)] [String] $AssociatedTenantId,
        [Parameter(Mandatory)] [Hashtable] $Body
    )

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