incidents/Get-CsBehaviorInfo.psm1
function Get-CsBehaviorInfo { <# .SYNOPSIS Get details on behaviors by providing behavior IDs .PARAMETER ID One or more behavior IDs #> [CmdletBinding()] [OutputType([psobject])] param( [Parameter(Mandatory = $true)] [array] $Id ) process{ $Param = @{ Uri = '/incidents/entities/behaviors/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 } } |