detects/Get-CsDetectInfo.psm1
function Get-CsDetectInfo { <# .SYNOPSIS View information about detections .PARAMETER ID One or more detection IDs #> [CmdletBinding()] [OutputType([psobject])] param( [Parameter(Mandatory = $true)] [array] $Id ) process{ $Param = @{ Uri = '/detects/entities/summaries/GET/v1' Method = 'post' Header = @{ accept = 'application/json' 'content-type' = 'application/json' } Body = @{ ids = $Id } | ConvertTo-Json } switch ($PSBoundParameters.Keys) { 'Verbose' { $Param['Verbose'] = $true } 'Debug' { $Param['Debug'] = $true } } Invoke-CsAPI @Param } } |