panoptcy / IBM-X-Force-Exchange

PowerShell based client for the use of the IBM X-Force Exchange API
MIT License
1 stars 1 forks source link

A few issues I encountered and resolutions for them #2

Open jhowel opened 2 years ago

jhowel commented 2 years ago

There are numerous ’ characters that need to be replaced with '.

The following needs to be added in the various function Process>Try sections before the invoke-restmethod:

PROCESS{

    if ($coun = $true){

         #API call
         Write-Verbose -Message "Requesting data from IBM XForce"

        try{

            $proceed  = $true
            if($Domain -ne ""){
                **[System.Net.ServicePointManager]::ServerCertificateValidationCallback = $null**
                $pDNS = $(Invoke-RestMethod -Uri "$API_URI/$Domain" -Method: Get -Headers $head)

If you don't you'll see write-error errors.

After sorting out the above issues, the scripts work very well.

AchrafBenmasaoud commented 1 year ago

Hey @jhowel

I have some troubling to understand the script. Could we chat a bit, if you don't mind?