Public/Logging/Test-KriticalUtcmTransientError.ps1
|
<# .SYNOPSIS Kritical.UTCM wrapper over Microsoft365DSC helper Test-M365DSCTransientError (category: Logging, module: M365DSCErrorHandler). .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: Logging Module: M365DSCErrorHandler Params: 1 #> function Test-KriticalUtcmTransientError { [CmdletBinding()] param( [Parameter(Mandatory)] [ErrorRecord] $ErrorRecord ) if (-not (Get-Command -Name 'Test-M365DSCTransientError' -ErrorAction SilentlyContinue)) { throw '[KriticalUtcm] Test-M365DSCTransientError not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Test-M365DSCTransientError' @PSBoundParameters } catch { Write-Error ('[KriticalUtcm/Test-KriticalUtcmTransientError] ' + 'Test-M365DSCTransientError' + ' failed: ' + $_.Exception.Message) throw } } |