Public/Graph/Invoke-KritTcmMgBetaForceDomainDelete.ps1

<#
.SYNOPSIS
    Krit.TCM wrapper over Microsoft365DSC helper Invoke-MgBetaForceDomainDelete
    (category: Graph, module: M365DSCGraphShim).

.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: Invoke-MgBetaForceDomainDelete
    Category: Graph
    Module: M365DSCGraphShim
    Params: 14
#>

function Invoke-KritTcmMgBetaForceDomainDelete {
    [CmdletBinding()]
    param(
        [String] $DomainId,
        [Object] $InputObject,
        [Object] $BodyParameter,
        [String] $ResponseHeadersVariable,
        [Hashtable] $AdditionalProperties,
        [SwitchParameter] $DisableUserAccounts,
        [SwitchParameter] $Break,
        [IDictionary] $Headers,
        [Object[]] $HttpPipelineAppend,
        [Object[]] $HttpPipelinePrepend,
        [SwitchParameter] $PassThru,
        [Uri] $Proxy,
        [PSCredential] $ProxyCredential,
        [SwitchParameter] $ProxyUseDefaultCredentials
    )

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