Giter VIP home page Giter VIP logo

qlik-cli-windows's Introduction

About

Qlik-Cli is a PowerShell module that provides a command line interface for managing a Qlik Sense environment. The module provides a set of commands for viewing and editing configuration settings, as well as managing tasks and other features available through the APIs.

Build Documentation Release Downloads Platform Slack License Project Status: Active – The project has reached a stable, usable state and is being actively developed.

The desired state configuration module has now been moved to https://github.com/ahaydon/Qlik-DSC

Usage

There are many cmdlets in the Qlik-Cli module for viewing and managing Sense resources, a common scenario is triggering tasks from an external application. This can be achieved using the Start-QlikTask command followed by a task name or ID, names with spaces must be enclosed in quotes. e.g.

Start-QlikTask "Reload Operations Monitor" -wait | Wait-QlikExecution

The command in the example triggers a task to run and then uses the Wait-QlikExecution command to monitor the task execution, providing status updates to the console as the task progresses and only returning when the task is complete. We can also use powershell to download apps that we want to move to another environment, by issuing a Get-QlikApp command with a filter we can restrict which apps will be downloaded, and then using pipelining the results can be passed to the Export-QlikApp command to download them.

Get-QlikApp -filter "stream.name eq 'My Stream'" | Export-QlikApp

Installation

PowerShell 4.0 or later is required to run Qlik-Cli. You can use the following command to check the version installed on your system.

$PSVersionTable.PSVersion

Ensure you can run script by changing the execution policy, you can change this for the machine by running PowerShell as Administrator and executing the command

Set-ExecutionPolicy RemoteSigned

If you do not have administrator rights you can change the policy for your user rather than the machine using

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

If you have PowerShell 5 or later you can install the module from NuGet using the following command.

Get-PackageProvider -Name NuGet -ForceBootstrap
Install-Module Qlik-Cli

Otherwise, the module can be installed by downloading and extracting the files to C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli, the module will then be loaded the next time you open a PowerShell console. You can also load the module for the current session using the Import-Module command and providing the name or path to the module.

Import-Module Qlik-Cli
Import-Module .\Qlik-Cli.psd1

Once the module is loaded you can view a list of available commands by using the Get-Help PowerShell command.

Get-Help Qlik

Connecting with certificates

Invoking a cmdlet will trigger the Connect-Qlik command with default parameters, this will attempt to locate a certificate from the certificate stores. Alternatively a certificate can be piped into the cmdlet using built-in powershell cmdlets to retrieve the certificate from the Windows certificate store.

Get-ChildItem cert:CurrentUser\My | Where-Object { $_.FriendlyName -eq 'QlikClient' } | Connect-Qlik sense-central

License

This software is made available "AS IS" without warranty of any kind. Qlik support agreement does not cover support for this software.

qlik-cli-windows's People

Contributors

ahaydon avatar analyticsearth avatar ashishpadman avatar chevcheli0s avatar christianherzog avatar clintcarr avatar djwaldo avatar felix-egli avatar ljckennedy avatar newmans99 avatar nillth avatar opeshm avatar shaun-hope avatar valentinpettmann avatar walliski avatar withdave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qlik-cli-windows's Issues

Error when connecting to QLik Sense site

Hi,
We are getting an error message after installing the certificate and when connecting to qlik sense server.

Attached screen shot has the error message. Any suggestions on how to fix this ?

error qlik cli

The Cmdlets doesn't function properly

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.

Changing of App owner is not possible out of the box

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

Error on get-help Qlik

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

  • get-help qlik
  •   + CategoryInfo          : NotSpecified: (:) [Get-Help], MethodException
      + FullyQualifiedErrorId : MethodCountCouldNotFindBest,Microsoft.PowerShell.Commands.GetHelpCommand
    
    

Unable to Import / Export Application with big file size

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

  • ... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
  • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
  • FullyQualifiedErrorId: WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand_

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

Qlik-Cli timeout on large apps

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

  • ... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

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

Invoke-QlikPut 400 bad request

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

  • ... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

New licenses - professional and analyzer

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"
}
}

Switch-QlikApp makes all sheets base sheets and removes destination sheets

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?

Error (403) Forbidden.

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
    

Get-ProfessionalAccessType not working to use

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.

image

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"?

Using & in variables in filters

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.

Unable to create one time trigger for a task

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;

-customProperties syntax issue

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

Unable to Replace the App in Stream upon Publishing

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.

Update Data Connection require connection string

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
}

Qlik-CLI and Qlik anlytic platform issues

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.

Update-QlikDataConnecion -owner format

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.

Get-Help Qlik returns error

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

Update-QlikUser applies wrong character encoding

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?

switch -tags in Update-QlikUser fails

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

How to update multiple values for a Custom Property?

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

Issue? Importing App & Replacing

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

  • ... $result = Invoke-RestMethod -Method $method -Uri $path @params -Web ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand_

Errors during execution in inforke RestMethod

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 ...
    
  •           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

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

  • ... ingServerNodes -tags $tags -verbose
  •                ~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [New-QlikVirtualProxy], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,New-QlikVirtualProxy

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 ...
    
  •                                                                ~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Add-QlikProxy], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Add-QlikProxy

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)
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

If you need more information please let me know.

Thank you,

Hendri

Update date connection password doesn't work

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
}

Export app without data

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

Bad request everytime when there is CP/tag for Streams

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?

get-qliktask where enabled and status is failed

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

$GetfailedTasks=(Get-QlikTask | where {$.status -eq 'FinishedFail'}).name
$getfailedenabledTasks=Get-QlikTask -full | where { $
.enabled -eq 'True' } | where {$_.name -in $GetfailedTasks} |Select name
Foreach ($task in $getfailedenabledTasks) {
Start-QlikTask $task.name
}

Receiving 401 Unauthorized Errors upon Connect

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

Update-QlikContentLibrary is missing

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.

Filter options

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 '$($appid.stream.name)' and name eq '$($appid.name)'"

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

This github and install-Module are very different versions

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.
image
How can I get the right Qlik-Cli.psm1 file if I am on Powershell 4.0 ? thanks

Unable to run Qlik- cli qliksense CMDlet for powershell

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

register-qliknode

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.

Not able to connect when using SAML

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

Unable to use due to lack of instructions

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.

Export multiple apps based on tag

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-QlikRule's [int] fails on high action values

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 :

Initial install issue - execution policy

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?

Connecting two environments

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

Running Qlik CLI commands from Windows Scheduler not working

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.