LabtechConsulting / ConnectWise-Manage-Powershell

This is a PowerShell wrapper for the ConnectWise Manage REST API.
http://labtechconsulting.com
34 stars 19 forks source link

Issue when connecting to our on premise CW server #1

Open Scollins-CN opened 5 years ago

Scollins-CN commented 5 years ago

Hi,

Really like what your trying to do with your script, We are trying to talk to our on premise CW server and keep on getting the following error when connecting.

$Result = Invoke-CWMWebRequest -Arguments $WebRequestArguments

VERBOSE: Using API Key authentication
VERBOSE: Validating authentication
VERBOSE: GET https://CWServerURL/v4_6_release/apis/3.0/system/info with 0-byte payload
Invoke-CWMWebRequest : 
At line:405 char:23
+ ...        $Result = Invoke-CWMWebRequest -Arguments $WebRequestArguments
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-CWMWebRequest

Connection has been halted.
VERBOSE: $CWMServerConnection, variable removed.

I think its because one of the variables isn't working correctly further down in the code isn't piping a variable through but could be off the mark

Any chance could you give me some guidance to resolve ?

Thanks

LabtechConsulting commented 5 years ago

Hello @Scollins-CN From what you posted it looks like you are having authentication issues. Have you tried creating new API keys or connecting with another authentication method such as with a username and password?