public/Remove-ProofpointProduct.ps1
Function Remove-ProofpointProduct{ [CmdletBinding(SupportsShouldProcess = $true)] Param( [Parameter(Mandatory=$true)] [string]$Domain, [Parameter(Mandatory=$true)] [string]$Product ) if(!($PPheaders)){ Write-Error "Not Connected to Proofpoint." } try{ Invoke-RestMethod -Uri "$PPURI/orgs/$Domain/products/$Product" -Headers $PPheaders -Method Delete }Catch{ Write-Output "$_" } } |