Open jcandresen opened 4 years ago
Connectwise recently updated the API to require an additional header called ClientId
You can create a clientID from https://developer.connectwise.com/ClientID
The readme did not update yet
Use this to connect:
#Public and private key created in connectwise manage
$pubkey = 'XXXXXXXXXXXXXXXX'
$privatekey = 'XXXXXXXXXXXXXXXX'
#ClientID created from https://developer.connectwise.com/ClientID
$clientId = "XXXXXXXX_XXXX_XXXX_XXXX_XXXXXXXXXXXX"
# Connect to Manage server
$Connection = @{
Server = $Server
Company = $Company
pubkey = $pubkey
privatekey = $privatekey
clientId = $clientId
}
Connect-CWM @Connection
Nice one, thanks @AndyFeiLi !
Worked for me!
I'm getting a json error when I try to connect, not entirely sure why.