PluginsOCSInventory-NG / lastpublicip

Retrieve last public from agent based on ipinfo.io website
GNU General Public License v2.0
1 stars 8 forks source link

add_SecurityProtocol #5

Open Nicolas-Eileo opened 2 years ago

Nicolas-Eileo commented 2 years ago

Add this ligne to fix this error message :

Invoke-RestMethod : The request was aborted: Could not create SSL/TLS secure channel. At C:\Program Files\OCS Inventory Agent\Plugins\lastpublic.ps1:6 char:11

  • $myjson = Invoke-RestMethod -Uri https://www.ipinfo.io/json
  • 
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
    eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Nicolas-Eileo commented 2 years ago

@mythevalentinus @gillesdubois @damienbelliard @fbomj ?