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