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