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