This will initialize the authorization variable.
Connect-CWM [-Server] <String> [-Company] <String> [[-pubkey] <String>] [[-privatekey] <String>] [[-Credentials] <PSCredential>] [[-IntegratorUser] <String>] [[-IntegratorPass] <String>] [[-MemberID] <String>] [-Force] [-DontWarn] [<CommonParameters>]
This will create a global variable that contains all needed connection and authorization information. All other commands from the module will call this variable to get connection information.
The URL of your ConnectWise Mange server.
Example: manage.mydomain.com
Required true
Position 1
Default value
Accept pipeline input false
Accept wildcard characters false
The login company.
Required true
Position 2
Default value
Accept pipeline input false
Accept wildcard characters false
Public API key created by a user
docs: My Account
Required false
Position 3
Default value
Accept pipeline input false
Accept wildcard characters false
Private API key created by a user
docs: My Account
Required false
Position 4
Default value
Accept pipeline input false
Accept wildcard characters false
Manage username and password as a PSCredential object [pscredential].
Required false
Position 5
Default value
Accept pipeline input false
Accept wildcard characters false
The integrator username
docs: Member Impersonation
Required false
Position 6
Default value
Accept pipeline input false
Accept wildcard characters false
The integrator password
docs: Member Impersonation
Required false
Position 7
Default value
Accept pipeline input false
Accept wildcard characters false
The member that you are impersonating
Required false
Position 8
Default value
Accept pipeline input false
Accept wildcard characters false
Ignore cached information and recreate
Required false
Position named
Default value False
Accept pipeline input false
Accept wildcard characters false
Used to suppress the warning about integrator accounts.
Required false
Position named
Default value False
Accept pipeline input false
Accept wildcard characters false
PS C:\>$Connection = @{
Server = $Server
Company = $Company
pubkey = $pubkey
privatekey = $privatekey
}
Connect-CWM @Connection
PS C:\>$Connection = @{
Server = $Server
Company = $Company
IntegratorUser = $IntegratorUser
IntegratorPass = $IntegratorPass
}
Connect-CWM @Connection
PS C:\>$Connection = @{
Server = $Server
Company = $Company
IntegratorUser = $IntegratorUser
IntegratorPass = $IntegratorPass
MemberID = $MemberID
}
Connect-CWM @Connection
PS C:\>$Connection = @{
Server = $Server
Company = $Company
Credentials = $Credentials
}
Connect-CWM @Connection
Author: Chris Taylor
Date: 10/10/2018
https://developer.connectwise.com/Manage/Developer_Guide#Authentication