prevention-policies/Disable-CsPreventPolicy.psm1

function Disable-CsPreventPolicy {
<#
    .SYNOPSIS
        Disable Prevention policies
 
    .PARAMETER ID
        An array of one or more Prevention policy IDs
#>

    [CmdletBinding()]
    [OutputType([psobject])]
    param(
        [Parameter(Mandatory = $true)]
        [array]
        $Id
    )
    process{
        $Param = @{
            Uri = '/policy/entities/prevention-actions/v1?action_name=disable'
            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
    }
}