Closed ChrisCalv closed 1 year ago
text formatted error
Invoke-ControlAPIMaster : An error has been thrown.
at Invoke-ControlAPIMaster
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-ControlAPIMaster
WARNING: Issue with request, status: 500 Internal Server Error WARNING: 1/3 retries, waiting 2s. WARNING: Issue with request, status: 500 Internal Server Error WARNING: 2/3 retries, waiting 4s. WARNING: Issue with request, status: 500 Internal Server Error WARNING: 3/3 retries, waiting 8s. Invoke-ControlAPIMaster : Max retries hit. Status: InternalServerError Internal Server Error At C:\Program Files\WindowsPowerShell\Modules\automateapi\1.1.5\Public\Invoke-ControlCommand.ps1:253 char:27
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-ControlAPIMaster
ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null. At C:\Program Files\WindowsPowerShell\Modules\automateapi\1.1.5\Public\Invoke-ControlAPIMaster.ps1:171 char:46
+ CategoryInfo : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
Invoke-ControlCommand : Exception of type 'Microsoft.PowerShell.Commands.WriteErrorException' was thrown. At line:1 char:1
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-ControlCommand
I am getting the same error:
Invoke-ControlAPIMaster : An error has been thrown.
at Invoke-ControlAPIMaster
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-ControlAPIMaster
WARNING: Issue with request, status: 500 Internal Server Error WARNING: 1/3 retries, waiting 2s. WARNING: Issue with request, status: 500 Internal Server Error WARNING: 2/3 retries, waiting 4s. WARNING: Issue with request, status: 500 Internal Server Error WARNING: 3/3 retries, waiting 8s.
I get the error when running the command: Get-AutomateComputer -Online $False | Compare-AutomateControlStatus | Repair-AutomateAgent -Action Restart
If I run the above but limit it down to a ComputerID I still get the error but the command shows as going through via Control log. When in bulk it errors out and does not look like the command gets sent through when checking the Control Command logs.
I just spent a couple days digging through the scripts to resolve this. It ended up being something simple, as ScreenConnect's one DB table was renamed. Just simply change "SessionConnectionEvent" to "SessionEvent" on line 245 in \1.1.5\Public\Invoke-ControlCommand.ps1 and then re-import the module. I