Public/Other/Invoke-KriticalUtcmFabricWebRequest.ps1
|
<# .SYNOPSIS Kritical.UTCM wrapper over Microsoft365DSC helper Invoke-M365DSCFabricWebRequest (category: Other, module: M365DSCFabricHelper). .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: M365DSCFabricHelper Params: 3 #> function Invoke-KriticalUtcmFabricWebRequest { [CmdletBinding()] param( [Parameter(Mandatory)] [String] $Uri, [String] $Method, [Hashtable] $Body ) if (-not (Get-Command -Name 'Invoke-M365DSCFabricWebRequest' -ErrorAction SilentlyContinue)) { throw '[KriticalUtcm] Invoke-M365DSCFabricWebRequest not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'Invoke-M365DSCFabricWebRequest' @PSBoundParameters } catch { Write-Error ('[KriticalUtcm/Invoke-KriticalUtcmFabricWebRequest] ' + 'Invoke-M365DSCFabricWebRequest' + ' failed: ' + $_.Exception.Message) throw } } |