ConnectWiseControlAPI icon indicating copy to clipboard operation
ConnectWiseControlAPI copied to clipboard

invoke-cwccommand error

Open ChrisCalv opened this issue 1 year ago • 0 comments

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 <ScriptBlock>, <No file>: line 1 At C:\Program Files\WindowsPowerShell\Modules\ConnectWiseControlAPI\0.3.5.0\Public\PageService\Invoke-CWCCommand.ps1:40 char:13

  • $null = Invoke-CWCWebRequest -Arguments $WebRequestArguments
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-CWCWebRequest

ChrisCalv avatar Mar 17 '23 15:03 ChrisCalv