christaylorcodes / ConnectWiseControlAPI

PowerShell wrapper for ConnectWise Control
MIT License
69 stars 36 forks source link

invoke-cwccommand error #22

Open ChrisCalv opened 1 year ago

ChrisCalv commented 1 year ago

Invoke-CWCCommand -GUID '52b516b2-d857-4d61-adb8-e7a3bcbcdc85' -Command 'hostname' Invoke-CWCWebRequest : An exception has been thrown. --> The remote server returned an error: (403) Forbidden. An error has been thrown. --> --> {"errorType":"UnauthorizedAccessException","message":"Invalid anti-forgery token","detail":null} at Invoke-CWCWebRequest, C:\Program Files\WindowsPowerShell\Modules\ConnectWiseControlAPI\0.3.5.0\Private\Invoke-CWCWebRequest.ps1: line 25 at Invoke-CWCCommand, C:\Program Files\WindowsPowerShell\Modules\ConnectWiseControlAPI\0.3.5.0\Public\PageService\Invoke-CWCCommand.ps1: line 40 at , : line 1 At C:\Program Files\WindowsPowerShell\Modules\ConnectWiseControlAPI\0.3.5.0\Public\PageService\Invoke-CWCCommand.ps1:40 char:13