Skip to content

invoke-cwccommand error #22

@ChrisCalv

Description

@ChrisCalv

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions