@@ -17,12 +17,22 @@ Adds credentials required to connect to the Control API
1717Connect-ControlAPI [-Server <String>] [-Quiet] [<CommonParameters>]
1818```
1919
20+ ### verify
21+ ```
22+ Connect-ControlAPI [-Credential <PSCredential>] [-Server <String>] [-Verify] [-Quiet] [<CommonParameters>]
23+ ```
24+
2025### credential
2126```
22- Connect-ControlAPI [-ControlCredentials <PSCredential>] [-Server <String>] [-Force] [-SkipCheck] [-Quiet]
27+ Connect-ControlAPI [-Credential <PSCredential>] [-Server <String>] [-Force] [-SkipCheck] [-Quiet]
2328 [<CommonParameters>]
2429```
2530
31+ ### apikey
32+ ```
33+ Connect-ControlAPI [-Server <String>] [-APIKey <Object>] [-SkipCheck] [-Quiet] [<CommonParameters>]
34+ ```
35+
2636## DESCRIPTION
2737Creates a Control hashtable in memory containing the server and username/password so that it can be used in other functions that connect to ConnectWise Control.
2838Unfortunately the Control API does not support 2FA.
@@ -36,16 +46,16 @@ All values will be prompted for one by one:
3646
3747Connect-ControlAPI
3848All values needed to Automatically create appropriate output
39- Connect-ControlAPI -Server "https://control.rancorthebeast.com:8040 " -ControlCredentials $CredentialsToPass
49+ Connect-ControlAPI -Server "https://control.rancorthebeast.com:8040 " -Credentials $CredentialsToPass
4050
4151## PARAMETERS
4252
43- ### -ControlCredentials
53+ ### -Credential
4454Takes a standard powershell credential object, this can be built with $CredentialsToPass = Get-Credential, then pass $CredentialsToPass
4555
4656``` yaml
4757Type : PSCredential
48- Parameter Sets : credential
58+ Parameter Sets : verify, credential
4959Aliases :
5060
5161Required : False
@@ -71,6 +81,21 @@ Accept pipeline input: False
7181Accept wildcard characters : False
7282` ` `
7383
84+ ### -APIKey
85+ Automate APIKey for Control Extension
86+
87+ ` ` ` yaml
88+ Type : Object
89+ Parameter Sets : apikey
90+ Aliases :
91+
92+ Required : False
93+ Position : Named
94+ Default value : ([SecureString]$Script:ControlAPIKey)
95+ Accept pipeline input : False
96+ Accept wildcard characters : False
97+ ` ` `
98+
7499### -Force
75100\[ Parameter(ParameterSetName = 'credential', Mandatory = $False)\]
76101\[ String\] $TwoFactorToken,
@@ -87,12 +112,28 @@ Accept pipeline input: False
87112Accept wildcard characters : False
88113` ` `
89114
115+ ### -Verify
116+ Attempt to verify Cached API key or Credentials.
117+ Invalid results will be removed.
118+
119+ ` ` ` yaml
120+ Type : SwitchParameter
121+ Parameter Sets : verify
122+ Aliases :
123+
124+ Required : False
125+ Position : Named
126+ Default value : False
127+ Accept pipeline input : False
128+ Accept wildcard characters : False
129+ ` ` `
130+
90131### -SkipCheck
91- {{Fill SkipCheck Description}}
132+ Used internally when quietly refreshing the Token
92133
93134` ` ` yaml
94135Type : SwitchParameter
95- Parameter Sets : credential
136+ Parameter Sets : credential, apikey
96137Aliases :
97138
98139Required : False
0 commit comments