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