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.
The desired state configuration module has now been moved to GitHub - ahaydon/Qlik-DSC: Qlik Sense module for PowerShell's Desired State Configuration
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
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
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
This software is made available "AS IS" without warranty of any kind. Qlik support agreement does not cover support for this software.
Link a virtual proxy to a proxy service
Create a task trigger
Checks if the user has the specified privileges on the resource and throws an exception if not.
Establishes a session with a Qlik Sense server, other Qlik cmdlets will use this session to invoke commands.
Duplicates a Qlik Sense app.
Exports an app to a local file.
Generates an exports a set of certificates.
Downloads the content of an app or library.
Exports SAML Service Provider metadata from a virtual proxy.
Returns version information from the Qlik Sense server.
Gets the number of tokens that are allocated, used, or in quarantine.
Gets analyzer access passes.
Gets app metadata.
Gets the path where certificates are exported to on the central node.
Gets information about content libraries.
Gets custom properties.
Gets data connections.
Gets engine services.
Gets information about installed extensions.
Gets the license for the server.
Gets login access passes.
Gets details of nodes in the cluster.
Gets objects of apps.
Gets the privileges a user has on the target resource.
Gets professional access passes.
Gets proxy services.
Gets reload tasks.
Gets system rules (security, license, load balancing).
Gets scheduler services.
Gets details of the cluster.
Gets the status of services on nodes.
Gets the current User Sessions on the specified Proxy
Gets the streams.
Gets the tags.
Gets tasks of all types (reload, user directory sync).
Gets users.
Gets user access passes.
Gets user directory connectors.
Gets the engines for load balancing based on rules.
Gets virtual proxies.
Imports or uploads an app.
Uploads content to an app or content library.
Uploads an extension.
Create a resource in Sense from a PowerShell object.
Calls an API using the DELETE method.
Downloads a resources.
Calls an API using the GET method.
Calls an API using the POST method.
Calls an API using the PUT method.
Uploads a file.
Creates a new content library.
Creates a new custom property.
Creates a new data connection.
Creates a new license allocation rule.
Creates a new node in the cluster.
Creates a new professional access group for license rules.
Creates a new system (security, license, load balancing) rule.
Creates a new stream.
Creates a table of resources with the specified properties.
Creates a new tag.
Creates a new reload task.
Adds a new Reload Task Schedule Trigger
Creates a new user.
Creates a new user access group for license rules.
Creates a new user directory to sync user attributes.
Creates a new virtual proxy configuration.
Publishes an app to a stream.
Publishes an app object (sheet/story) to the community.
Registers a new node in the cluster and deploys certificates to it.
Deletes an analyzer access pass assignment.
Deletes an app.
Deletes a content library and its content.
Deletes a custom property and all assigned values.
Deletes a data connection.
Deletes an extension.
Removes a node from the cluster.
Deletes an app object’s metadata.
Deletes a professional access pass assignment.
Deletes a system rule.
Kills the specified session on the specified Virtual Proxy
Deletes a stream.
Deletes a tag and removes it from all resources.
Deletes a task.
Remove a specific Schdule from a reload task
Deletes a user.
Deletes a user access pass.
Deletes a user directory connection.
Deletes a virtual proxy configuration.
Assigns the central node role to the specified node.
Sets the site license for the cluster.
Triggers a task to start.
Replaces one app with another.
Triggers a user directory to be synced.
Unpublishes an app object from the community.
Updates the properties of an app.
Updates the properties of a content library.
Updates a custom property definition.
Updates a data connection.
Updates the properties of an engine service.
Updates the properties of an extension.
Updates the properties of a node.
Updates the properties of an app object.
Updates ODAG configuration.
Updates the properties of a proxy service.
Updates a reload task.
Updates a system rule.
Updates the properties of a scheduler service.
Updates the configuration of the cluster.
Updates a stream.
Updates the properties of a user.
Updates the configuration of a user directory.
Updates a virtual proxy configuration.
Waits for a task or execution session to finish.
http://adamhaydon.com/Qlik-Cli-Windows/
https://github.com/ahaydon/Qlik-Cli-Windows