I am trying to send events from my host machine to splunk using HEC. My Function: Invoke-RestMethod -Method Post -Uri $hecUri -Headers @{"Authorization" = "Splunk $hecToken"} -Body $jsonEventData -ContentType "application/json" Error: Invoke-RestMethod : Unable to connect to the remote server At C:\Users\myusername\OneDrive\Desktop\Lab3.ps1:29 char:1 + Invoke-RestMethod -Method Post -Uri $hecUri -Headers @{"Authorization ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : System.Net.WebException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
... View more