Skip to main content

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
Showing results for 
Search instead for 
Did you mean: 

Qlik-Cli Contect-Qlik Cmdlt not working in PowerShell Script

I have a powershell that relies on the Qlik-Cli powershell module. The script has suddenly stopped after Qlik Sense was upgraded to the latest version June 2020. I had to update the certificates for Nprinting on the Nprinting server
to allow for Nprinting to communicate with the Qlik Sense Server. Nprinting is now communicating successfully with the Qlik Sense server. The powershell script that I was using used the following command.
"Connect-Qlik -Computername $QlikSenseServer -TrustAllCerts -UseDefaultCredentials"
The problem is that I'm suddenly getting the following error
Invoke-RestMethod : The underlying connection was closed: Could not establish
trust relationship for the SSL/TLS secure channel.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:29
+ $result = Invoke-RestMethod -Method $method -Uri $path @params
-SessionVaria ...
 + CategoryInfo: InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
 + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.
I have been trying to figure why the script is suddenly unable to use the certificates that were generated for me from the Qlik Sense Server for Nprinting.
The Service account that the script is run under is the same that is used for the services in Qlik Sense and the only thing that appears to have changed is the fact that Qlik Sense has been upgraded.
1 Reply

I managed to fix the issue. I uninstalled the Qlik-Cli PowerShell Module and resinstalled it from a fresh download off git-hub so far everything seems to be working. will keep an eye on things and see how it goes