ahaydon / qlik-cli-windows Goto Github PK
View Code? Open in Web Editor NEWQlik-Cli for Windows
Home Page: https://adamhaydon.uk/Qlik-Cli-Windows/
License: GNU General Public License v2.0
Qlik-Cli for Windows
Home Page: https://adamhaydon.uk/Qlik-Cli-Windows/
License: GNU General Public License v2.0
Im trying to create a script to replace the SSL-cert Thumbprint of QS. I can get it working using postman by doing a GET to the proxy and then modifiying the sslBrowserCertificateThumbprint property and then run a new request to the same URI using the Put Method.
But when i try to get it working with Qlik-CLI, i get a 400 - bad request.
Here is my script so far:
Connect-Qlik
$proxies = Invoke-QlikGet -path "/qrs/proxyservice";
$path = "/qrs/proxyservice/" + $proxies.id;
$proxy = Invoke-QlikGet -path $path;
#$proxy.settings.sslBrowserCertificateThumbprint = $Thumbprint_in_certstore;
Invoke-QlikPut -path $path -body $proxy;
The error i get is:
Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\1.16.0\functions\core.ps1:36 char:17
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running the Packer script will throw an error and fails when the command tries to run the VBoxGuestAdditions.exe file of the virtual CD drive. I'm not convinced this is needed if we are running the box headless though.
Running
Connect-Qlik -Computername "central node" -Credential <domain\id>
Results in a 401 Unauthorized error.
Using
Connect-Qlik -Computername "central node" -UseDefaultCredentials
when logged into server works.
I have also tried the following and can see the TLS1.2 is being used:
$req = New-Object System.Net.WebClient
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Connect-Qlik -computername Connect-Qlik -Computername "central node" -Credential <domain\id>
(From Fiddler log)
Secure Protocol: Tls12
Cipher: Aes256 256bits
Hash Algorithm: Sha384 384bits
Key Exchange: ECDHE_RSA (0xae06) 256bits
A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.
Version: 3.3 (TLS/1.2)
Connect is via Windows Authentication port on server 4244.
Also, testing with curl is working with this command:
curl -v -L --ntlm --negotiate -u : --insecure "central node" /qrs/app?xrfkey=0123456789abcdef --header "x-qlik-xrfkey: 0123456789abcdef" --header "User-Agent: Windows"
Any ideas on how to solve?
Regards
Hi,
We are using QLIk-Cli.psm1 to start the task remotely.
I am able to run the powershell script through application service ID, but if same script when I try to run with our another alternate service ID( used only for remote execution) it doesn't work.
I tried providing Admin access to Alternate Service ID, it doesn't work.
Below is the error::\CorpData\UserFiles\QlikSenseBatch\Job\JHDH_Composable_Extract_test.ps1
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1:77 char:15
... $result = Invoke-RestMethod -Method $method -Uri $path @params -Ses ...
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1:80 char:15
... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Get-Member : You must specify an object for the Get-Member cmdlet.
At E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1:116 char:30
... $Script:enums = $enums | Get-Member -MemberType NoteProperty | forea ...
CategoryInfo : CloseError: (Smiley Happy [Get-Member], InvalidOperationException
FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1:80 char:15
... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1:80 char:15
... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1:80 char:15
... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Get-Member : You must specify an object for the Get-Member cmdlet.
At E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1:116 char:30
... $Script:enums = $enums | Get-Member -MemberType NoteProperty | forea ...
CategoryInfo : CloseError: (Smiley Happy [Get-Member], InvalidOperationException
FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1:80 char:15
... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
I tried following adding execution policy, it did not work.
Set-ExecutionPolicy RemoteSigned
It will be great help if someone can advice on how to fix this.
Script:
import-module "E:\CorpData\UserFiles\QlikSenseBatch\QlikCliTaskTrigger\Qlik-Cli.psm1"
connect-qlik Servername -username Internal\sa_scheduler
start-qliktask "Task Name"
Regards,
bharath
There is a mismatch between the Qlik-Cli which I get when using "Install-Module" in PS 5.0 and when I download the Qlik-Cli.psm1 from this github. The first will install a 70kB big Qlik-Cli.psm1 under C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli whereas the latter is only 3kB in size and knows only 10 commands.
How can I get the right Qlik-Cli.psm1 file if I am on Powershell 4.0 ? thanks
Hi!
I'm trying out the new version 1.16.0, where Get-QlikAnalyzerAccess is present (and is working).
I can't seem to find or use Get-ProfessionalAccessType though.
I can see that the function is present in the file C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\1.16.0\resources\license.ps1, but it doesn't get imported, is not usable, and not visible through get-help.
Any ideas?
Also, Remove-QlikAnalyzerAccessType is missing.
I know I filed the last bug :)
Is the naming here correct though, accessing the API ...accesstype, but he function for analyzer is called just "access"?
The result from operational Lastexecutionresult from the get-qliktask when using the -full parameter doesn't return the right value.
This also happens on the get-qlikreloadtask
As a work around, i was able to get the items i needed using this
$getfailedenabledTasks=Get-QlikTask -full | where { $.enabled -eq 'True' } | where {$_.name -in $GetfailedTasks} |Select name
Foreach ($task in $getfailedenabledTasks) {
Start-QlikTask $task.name
}
I am working on creating a deployment script for our new versions of our app.
Before we deploy the apps we like to reload them to ensure they have the latest data.
Currently it seems that the only way to create a task is with a daily trigger. For my use case I would like to use the onetime trigger.
The below snippet is from Add-QlikTrigger
If($date) {
$date = Get-Date -Format yyyy-MM-ddTHH:mm:ss.000Z $date
$update = @{
schemaEvents = @(@{
name = "Daily";
enabled = $true;
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:32 char:15
$result = Invoke-RestMethod -Method $method -Uri $path @params -WebSession $ ...
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Hello,
running the latest version and when I run Get-QlikUserAccessType I don't get any output. Did I miss something or this a bug?
When you run Switch-QlikApp the destination app (specified by -appId) gets all the sheets from the source app (specified by -id) - I think it also keeps its own non-Base sheets too from what I can tell.
This is of course most obvious when doing this from published app to published app where you can end up with hundreds of sheets appearing as Base when they were just "My Sheets" for multiple users before.
My use case is wanting to clone Production into a Sandbox environment for config testing (hence published to published) so I'm looping through a list of apps and doing this for each:
Switch-QlikApp -id (Get-QlikApp -filter "stream.name eq '$fromStream' and name eq '$app'").id
-appId (Get-QlikApp -filter "stream.name eq '$toStream' and name eq '$app'").id
Doing publishing of a published app isn't possible in the QMC, you have to duplicate and republish. But the publishing behaviour in the QMC of this is that the destination app gets its base sheets replaced by the base sheets of the and keeps its non-base sheets (community & my sheets). Is there any way to replicate this behaviour with Qlik-Cli? I tried using Publish-QlikApp to start with but that doesn't appear to have a way to publish over an existing app and I assumed Switch-QlikApp is what I wanted...
Do I have to copy, publish & delete to achieve this? Or will that just do the same thing?
Tag Not found regardless of the fact the tag existed
Hello,
I encountered issue when trying to create a new stream or data connection with custom property defined. Based in the help command
New-QlikDataConnection [[-name] ] [[-connectionstring] ] [[-type] ] [-customProperties <string[]>] [-tags <string[]>] [-username ] [-password ] []
I tried PS C:\windows\system32> New-QlikDataConnection -name CLI -connectionstring "c:\temp" -type folder -customProperties "CLI" but always ended with Bad Request
Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
No matter what syntax I am using I am getting Bad Request when trying to define Custom Property via CLI.
Thanks for any comments here. The tool is awesome.
Kind Regards
Laci
Hi,
I just wondering if there is any function param to call Export-QlikApp without data? It would be nice to export some apps without data.
Thank you
I need to update the custom properties in a content library object. There is no update function for content libraray.
As workaround I try it with Update-QlikObject. However, a function would be easier.
Hi, Trying to set up a export/import & replace routine, which is working up to the replace.
As soon as I add the -replace switch and pass the GUID to replace hitting errors.
I've stepped through and see it failing at the Invoke, which I've stripped out and tested seperatly without joy.
Am I missing something or is this a bug?
Invoke-QlikUpload -filename G:\Deployments\Everyone\Test_PG.qvf -path "/qrs/app/upload?name=Test_PG&replace=ec6526ea-8808-4b0d-84af-92b993a1dd45" -ContentType application/vnd.qlik.sense.app
ERRORS WITH
_Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
At C:\windows\system32\windowspowershell\v1.0\Modules\Qlik-Cli\functions\core.ps1:32 char:15
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After exporting stream info to json and attempting to update it back, bad request is always returned when either tags or Cps are specified. Do you think you could give example how to do it if it is possible? Or is it a bug?
When trying to connection string username or password I noticed the connectionstring parameter was required. I updated the powershell function to check if it's filled out or not. Below is an example.
if($ConnectionString){
$qdc.connectionstring = $ConnectionString
}
Hello again. after a while I'm coming back tot his topic. I am not able to update owner of a Data Connection. I am executing below command where data connection is updated except of the owner which remains the same
Update-QlikDataConnection -id $destdataconn.id -connectionstring $dataconn.connectionstring -owner $dataconn.owner
$dataconn.owner consist of
id : f71e376e-f2d4-4a2d-acc6-37bff42630e0
userId : id
userDirectory : domain
name : name
privileges :
Could you please assist in which format do i need to provide owner value ?
Thanks in advance.
Hi,
Is there any chance to get list of all possible filters for Get-QlikApp function?
Stream name and app name are only ones that are working for me.
Get-QlikApp -filter "stream.name eq '$(
I would like to filter for app name that is not published - any ideas how to achieve this?
Is it possible to use LastModified or empty stream in filter? If, so i would be grateful for any examples.
Thanks for any comments
Hey,
Tool is not enabling change of app owner. At the moment it possible to change only app name, description, tag or custom properties. Is it possible to extent this functionality with enabling changing the owner, as well?
Actual Update-QlikApp function:
function Update-QlikApp { [parameter(Mandatory=$true,ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,Position=0)]
[string]$id,
[string]$name,
[string]$description,
[string[]]$customProperties,
[string[]]$tags
Any comments are appreciated, Thanks
BR, Laci
Hello,
We have a script that is created by a Qlik consultant in the past to copy a template stream for a new client. We are using Qlik Sense November 2017 version with DLL’s from the current SDK version 13.3.0.
But when I am running the script with the new dll's. I get these errors. I am not familiar with PowerShell so any help is appreciated.
nvoke-RestMethod : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
At C:\windows\system32\windowspowershell\v1.0\Modules\qlik-cli\qlik-cli.psm1:77 char:15
$result = Invoke-RestMethod -Method $method -Uri $path @params -SessionVaria ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And the other error is maybe because we don't run the latest version? I am not sure.
New-QlikVirtualProxy : A parameter cannot be found that matches parameter name 'tags'.
At C:\windows\system32\windowspowershell\v1.0\Modules\qlik-cli\qlik-cl.psm1:582 char:410
~~~~~
Add-QlikProxy : Cannot bind argument to parameter 'VirtualProxyId' because it is an empty string.
At C:\windows\system32\windowspowershell\v1.0\Modules\qlik-cli\qlik-cli.psm1:587 char:68
Add-QlikProxy -ProxyId $(Get-QlikProxy).id -VirtualProxyId $virtualProxy ...
~~~~~~~~~~~~~
Method invocation failed because [Qlik.Engine.App] does not contain a method named 'GetProperties'.
At C:\windows\system32\windowspowershell\v1.0\Modules\qlik-cli\qlik-cli.psm1:342 char:9
$app.DoSave($app.GetProperties().FileName)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you need more information please let me know.
Thank you,
Hendri
Let me know if there is any PowerShell cmd-let / command to execute the Data Load for an App in Workspace using CLI.
Sample command: New-QlikRule -Name Q-QMC-Administrators -resourceFilter * -actions 4294967295 -rule '(user.role="Administrator")' -rulecontext qmc -category Security -Verbose
Response:
New-QlikRule : Cannot process argument transformation on parameter 'actions'. Cannot convert value "4294967295" to type "System.Int32". Error: "Value was either too large or too small for an Int32."
At line:1 char:68
- ... me Q-QMC-Administrators -resourceFilter * -actions 4294967295 -rule ' ...
~~~~~~~~~~
- CategoryInfo : InvalidData: (:) [New-QlikRule], ParameterBindingArgumentTransformationException
- FullyQualifiedErrorId : ParameterArgumentTransformationError,New-QlikRule
Fix:
[int]$actions,
> [int64]$actions,
Use case: Creating a pseudo RootAdmin role
Get-QlikRule -filter "name eq 'RootAdmin'"
id : 9a872869-8672-41da-9c6a-fc599e713aeb
category : Security
type : ReadOnly
name : RootAdmin
rule : user.roles = "RootAdmin"
resourceFilter : *
actions : 4294967295
comment : Root admin should have full access rights
disabled : False
privileges :
Hi Adam,
We recently switched to SAML authentication. If i try to connect i get an HTML page in the PowerShell interface. I can still use NTLM authentication but i need to somehow force the virtual proxy to by used by adding the /ntlm prefix.
Is there anyway to do so with the current code?
Thanks,
Nicolas
HI,
using the CLI Command
Update-QlikUser
with the switch "-tags" fails, regardles i'm using a Text or Text-Array as parameter.
It seems, that you wrap the result of a function call not as an array
I researched the code and fixed that problem.
In Script "users.ps1" Line 82 is
$user.tags = GetTags $tags
It should be
$user.tags = @(GetTags $tags)
Thanks for your great Tool!!
Michael
Running Get-Help Qlik
returns an error after initial install:
Name Category Synopsis
---- -------- --------
Add-QlikProxy Function Add-QlikProxy [-ProxyId] <String> [-VirtualProxyId] <String> [-Verbose] ...
Add-QlikTrigger Function Add-QlikTrigger [-taskId] <String> [-OnSuccess <String[]>] [-date <Strin...
Add-QlikVirtualProxy Function Add-QlikVirtualProxy [-id] <String> [-loadBalancingServerNodes <String[]...
Get-Help : Unable to find type [PSCredential]: make sure that the assembly containing this type is loaded.
At line:1 char:9
+ get-help <<<< qlik
+ CategoryInfo : InvalidOperation: (PSCredential:String) [Get-Help], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
The other commands exist and can be autocompleted. Once a Connect-Qlik
statement has been run (albeit unsuccessfully), then the error changes slightly, showing more commands before another error.
Name Category Synopsis
---- -------- --------
Add-QlikProxy Function Add-QlikProxy [-ProxyId] <String> [-VirtualProxyId] <String> [-Verbose] ...
Add-QlikTrigger Function Add-QlikTrigger [-taskId] <String> [-OnSuccess <String[]>] [-date <Strin...
Add-QlikVirtualProxy Function Add-QlikVirtualProxy [-id] <String> [-loadBalancingServerNodes <String[]...
Connect-Qlik Function Establishes a session with a Qlik Sense server, other Qlik cmdlets will ...
Copy-QlikApp Function Copy-QlikApp [-id] <String> [[-name] <String>] [-Verbose] [-Debug] [-Err...
Export-QlikApp Function Export-QlikApp [-id] <String> [[-filename] <String>] [-Verbose] [-Debug]...
Get-Help : Unable to find type [SecureString]: make sure that the assembly containing this type is loaded.
At line:1 char:9
+ get-help <<<< qlik
+ CategoryInfo : InvalidOperation: (SecureString:String) [Get-Help], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
Hi ,
-customProperties @("AppName=Finance")
Can you please help with the syntax when we have to update(append) to the customProperty, say inlude Marketing also as in the example referred in #36?
Requirement - update the custom property that basically defines the streams a user can find in the hub. A user can see one or more streams.
Best Regards,
K
Since June 2018 there is a new parameter.
Would it be possible to add it there?
https://help.qlik.com/en-US/sense-developer/June2018/Subsystems/RepositoryServiceAPI/Content/RepositoryServiceAPI/RepositoryServiceAPI-App-Export-App-Two-Calls.htm
Import-QlikApp still has the -replace option.
From Qlik's help, it seems that this option is not available since QS 2.2: 2.2 - App: Import app
Please remove it, in order to avoid confusion.
Many thanks,
Riccardo
Might be worth adding to the documentation that you need to change the execution policy to let this run?
Set-ExecutionPolicy RemoteSigned
I know it's pretty standard for external modules like this, but worth it for first timers?
Unable to Replace the App in Stream upon Publishing
The App is not able to get replaced upon Publishing the App. Please Add this functionality to the cmdlet.
Qlik-PublishApp cmdlet does not support the replacing app feature.
The Cmdlets doesn't function properly.
ahaydon do you have a documentation for the related Examples.
Especially, I am looking for a process for Importing and Exporting the QlikApps.
IT will be great to provide some documentation.
Dear all,
We are using Qlik Sense September 2018 SR2 and with the precious help of Qlik-Cli we are trying to import the application which is being given with Qlik Scalability Tools (File: 200M-PTSalesAnalytics.qvf , Size: 5,45GB).
We use the following commands to import the file
Import-Module Qlik-Cli
Connect-Qlik -computername qserver -username qserver\QlikAdmin
Import-QlikApp -name "200M-PTSalesAnalytics" -file "C:\200M-PTSalesAnalytics.qvf" -upload
Notes: QlikAdmin is a RootAdmin account.
While the file initially is being uploaded (the bytes counter disappear after several minutes) , we get the following error
_Invoke-RestMethod: The remote server returned an error: (500) Internal Server Error.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:32 char:15
When we try to import an application with a smaller file size (e.g. 800MB), the operation completes successfully. Do you have any idea on how can we workaround this error?
Thanks for your time and actions!
Best regards,
iLiAS
When registering or adding a new node with the -failovercandidate switch all services should default to install.
Failovers need all services.
In this version of Qlik-Cli failure to enable the services will only enable the repository.
Here's what I was trying to do:
$apps = 'This Extract','This & That Extract'
foreach ($app in $apps)
{
echo "Processing: $app"
get-qlikapp -filter "stream.name eq 'Extract' and name eq '$app'" | copy-qlikapp -name "$app COPY"
}
The first app works fine, but any app with & in the name fails.
If I run just:
get-qlikapp -filter "stream.name eq 'Extract' and name eq 'This & That Extract'" | copy-qlikapp -name "This & That Extract COPY"
it works fine, so it appears to be to do with how it's interpreting the string.
I've tried escaping the & - \&
or `&
- in the variable and using "
or `
around various things to no avail.
This may be my inexperience with PowerShell rather than an issue, but I couldn't find a workaround other than hard-coding the values. Interestingly Streams with & in them don't seem to cause the same issue.
Following error is received. PowerShell 5.1, latest download used as of Dec 17/2018. Sense November 2018 patch 1
Invoke-QlikDownload Function Qlik-Cli ...
Invoke-QlikGet Function Qlik-Cli ...
Invoke-QlikPost Function Qlik-Cli ...
Invoke-QlikPut Function Qlik-Cli ...
Invoke-QlikUpload Function Qlik-Cli ...
New-QlikContentLibrary Function Qlik-Cli ...
New-QlikCustomProperty Function Qlik-Cli ...
get-help : Cannot find an overload for ".ctor" and the argument count: "1".
At line:1 char:1
+ CategoryInfo : NotSpecified: (:) [Get-Help], MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest,Microsoft.PowerShell.Commands.GetHelpCommand
Hi! Great tool guys, although I have some difficulties trying to connect from one environment to another one. Both environments works fine by them self. Error Im getting:
Invoke-RestMethod : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS
secure channel.
Any idea how to solve it? Or maybe you could explain more briefly about certificates? Thanks
Hi team,
We are using Qlik-CLI to call Qlik Apis for automation. But unfortunately, Copy app function is getting timeout error of large apps {~8GB}. We have downloaded the latest version and tested it.
Script:
Script/CLI Commands :
Connect-Qlik -Computername $qlikSenseProxyHost -UseDefaultCredentials -TrustAllCerts
$app_id = getAppID -AppName "Test APP" -AppOwner "singhs2"
$app_id
$start_time = Get-Date
Copy-QlikApp -id $app_id -name "Test APP - testcopy2"
Write-Output "Time taken : $((Get-Date).Subtract($start_time).Seconds) second(s)"
error:
Output :
uildVersion : 17.6.4.0
buildDate : 9/20/2013 10:09:00 AM
databaseProvider : Devart.Data.PostgreSql
nodeType : 1
sharedPersistence : True
requiresBootstrap : False
singleNodeOnly : False
schemaPath : About
Name eq 'Test APP'
b0f4121a-e66f-4fd6-8d9a-2aab05cbc093
Invoke-RestMethod : The operation has timed out
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:32 char:15
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Time taken : 41 second(s)
As you can see it timed out in 41 sec.
This code works fine for smaller apps.
for large apps, API completed copy file but get time out error.
We have also tried setting up timeout in powershell but it didn't help.
Can you please investigate it. It is a showstopper for us. We have discussed this with Qlik support but they are not able to assist as it is CLI issue.
Regards
Sarvjeet Saini
When using the following script:
$userid= 'tiilag'
$currentpropername = "Ström Tina"
Update-QlikUser -id $(Get-QlikUser -filter "userid eq '$userid'" -full).id -name $currentpropername
The users name switches from "Ström Tina" to "Str�m Tina". It seems to be a problem with character encoding.
Can we force the charset for the Invoke-RestMethod ?
I've tried to convert it by [System.Text.Encoding]::UTF8.GetBytes($currentpropername) and using New-Object -typename System.Text.UTF8Encoding but it doesn't seem to work. Most other online solutions are not built around a library like Qlik-Cli, meaning perhaps we can enforce it within the script?
I found when trying to apply a new password to the data connector the powershell command throws an error. I updated the function as below.
if( $Credential ) {
$qdc.username = $Credential.GetNetworkCredential().Username
$qdc | Add-Member -Name password -Value $Credential.GetNetworkCredential().Password -MemberType NoteProperty
}
This might be excellent tool to manage Qlik Sense, but I'm unable to use it because there are not sufficient instructions available how script authenticates to Qlik Sense server. Given example about using certificates does not guide enough to get certificates working. Step by step intructions and examples of usage of function calls are necessary.
Hi Techies,
I got a use case where I need to trigger a Qlik Sense task right after Windows Task Scheduler task completion.
I have installed and configured Qlik CLI module in powershell. I have created one .ps1 file which has two commands:
Get-ChildItem cert:CurrentUser\My | Where-Object { $_.FriendlyName -eq 'QlikClient' } | Connect-Qlik sense-central; Start-QlikTask "Manually triggered reload of Task" -wait | Wait-QlikExecution
Decoding abvove command in ps1 file: Connecting certificates Get-ChildItem cert:CurrentUser\My | Where-Object { $_.FriendlyName -eq 'QlikClient' }
Trigger Qlik Sense task : Connect-Qlik sense-central; Start-QlikTask "Manually triggered reload of Task" -wait | Wait-QlikExecution
When I am running this .ps1 file in powershell it is triggering Qlik task successful but I have a use case where I need to run the above powershell command in windows task scheduler.
Above command I found on page https://github.com/ahaydon/Qlik-Cli
In simple I need to run Qlik Cli command by Windows Task Scheduler.
I tried few stack over flow solution like https://stackoverflow.com/questions/13015245/powershell-script-wont-execute-as-a-windows-scheduled-t...
but it is not working. 0*1 is the message coming out. Running directly .ps1 file works fine.
Can you please help me to run a Qlik CLI command through Windows Task Scheduler ?
Thanks,
Rohit
I noticed that there is no support for Professional and Analyzer licenses. It needs to be added in the resources/license.ps1 file.
From what I can see, the following is missing (please verify):
function Get-QlikAnalyzerAccess {
[CmdletBinding()]
param (
[parameter(Position=0)]
[string]$id,
[string]$filter,
[switch]$full,
[switch]$raw
)
PROCESS {
$path = "/qrs/license/analyzerAccessType"
If( $id ) { $path += "/$id" }
If( $full ) { $path += "/full" }
If( $raw ) { $rawOutput = $true }
return Invoke-QlikGet $path $filter
}
}
function Get-ProfessionalAccessType {
[CmdletBinding()]
param (
[parameter(Position=0)]
[string]$id,
[string]$filter,
[switch]$full,
[switch]$raw
)
PROCESS {
$path = "/qrs/license/professionalaccesstype"
If( $id ) { $path += "/$id" }
If( $full ) { $path += "/full" }
If( $raw ) { $rawOutput = $true }
return Invoke-QlikGet $path $filter
}
}
function New-QlikProfessionalAccessGroup {
[CmdletBinding()]
param (
[string]$name
)
PROCESS {
$json = (@{
name=$name
} | ConvertTo-Json -Compress -Depth 10)
return Invoke-QlikPost "/qrs/License/ProfessionalAccessGroup" $json
}
}
function Remove-QlikProfessionalAccessType {
[CmdletBinding()]
param (
[parameter(Position=0,ValueFromPipelinebyPropertyName=$true)]
[string]$id
)
PROCESS {
return Invoke-QlikDelete -path "/qrs/license/professionalaccesstype/$id"
}
}
Has anyone tried to used the Qlik-CLI with the Qlik analytics platform or QAP. I have been tasked with doing some automation using PowerShell and the Qlik-CLI to Automate Reload Tasks to be managed with CA-AutoSys. Everything works fine with Qlik Sense but we are having issues with it on the QAP just wondering if the API's are different in QAP vs Qlik Sense mainly because I cannot get the cmdlts to respond on the QAP Server.
Hello,
Could you please help we with building a command which will export all apps containing specific tag e.g. DONE.
I have tried following attempts but without a luck.
Get-QlikApp -filter "tags eq 'DONE'" -raw | Export-QlikApp
Export-QlikApp -id $(Get-QlikApp -filter "tags eq DONE").id -filename "D:\Apps"
Thanks in advance!
Laco
New-QlikVirtualProxy not working gives 500 internal server error, where as Get-QlikVirtualProxy working fine
Is there a way we can have the qlik health check added to the Module? I was trying to get it to work but it keep failing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.