Qlik-Cli Module

Qlik-Cli

Qlik-Cli Module_第1张图片

 

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

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 Cmdlets

Add-QlikProxy

Link a virtual proxy to a proxy service

Add-QlikTrigger

Create a task trigger

Add-QlikVirtualProxy

Assert-QlikPrivilege

Checks if the user has the specified privileges on the resource and throws an exception if not.

Connect-Qlik

Establishes a session with a Qlik Sense server, other Qlik cmdlets will use this session to invoke commands.

Copy-QlikApp

Duplicates a Qlik Sense app.

Export-QlikApp

Exports an app to a local file.

Export-QlikCertificate

Generates an exports a set of certificates.

Export-QlikContent

Downloads the content of an app or library.

Export-QlikMetadata

Exports SAML Service Provider metadata from a virtual proxy.

Get-QlikAbout

Returns version information from the Qlik Sense server.

Get-QlikAccessTypeInfo

Gets the number of tokens that are allocated, used, or in quarantine.

Get-QlikAnalyzerAccessType

Gets analyzer access passes.

Get-QlikApp

Gets app metadata.

Get-QlikAuditRule

Get-QlikCertificateDistributionPath

Gets the path where certificates are exported to on the central node.

Get-QlikContentLibrary

Gets information about content libraries.

Get-QlikCustomProperty

Gets custom properties.

Get-QlikDataConnection

Gets data connections.

Get-QlikEngine

Gets engine services.

Get-QlikExtension

Gets information about installed extensions.

Get-QlikLicense

Gets the license for the server.

Get-QlikLicenseAudit

Get-QlikLoginAccessType

Gets login access passes.

Get-QlikNode

Gets details of nodes in the cluster.

Get-QlikObject

Gets objects of apps.

Get-QlikPrivilege

Gets the privileges a user has on the target resource.

Get-QlikProfessionalAccessType

Gets professional access passes.

Get-QlikProxy

Gets proxy services.

Get-QlikRelations

Get-QlikReloadTask

Gets reload tasks.

Get-QlikRule

Gets system rules (security, license, load balancing).

Get-QlikScheduler

Gets scheduler services.

Get-QlikServiceCluster

Gets details of the cluster.

Get-QlikServiceStatus

Gets the status of services on nodes.

Get-QlikSession

Gets the current User Sessions on the specified Proxy

Get-QlikStream

Gets the streams.

Get-QlikTag

Gets the tags.

Get-QlikTask

Gets tasks of all types (reload, user directory sync).

Get-QlikTaskSchedule

Get-QlikUser

Gets users.

Get-QlikUserAccessType

Gets user access passes.

Get-QlikUserDirectory

Gets user directory connectors.

Get-QlikValidEngines

Gets the engines for load balancing based on rules.

Get-QlikVirtualProxy

Gets virtual proxies.

Import-QlikApp

Imports or uploads an app.

Import-QlikContent

Uploads content to an app or content library.

Import-QlikExtension

Uploads an extension.

Import-QlikObject

Create a resource in Sense from a PowerShell object.

Invoke-QlikDelete

Calls an API using the DELETE method.

Invoke-QlikDownload

Downloads a resources.

Invoke-QlikGet

Calls an API using the GET method.

Invoke-QlikPost

Calls an API using the POST method.

Invoke-QlikPut

Calls an API using the PUT method.

Invoke-QlikUpload

Uploads a file.

New-QlikContentLibrary

Creates a new content library.

New-QlikCustomProperty

Creates a new custom property.

New-QlikDataConnection

Creates a new data connection.

New-QlikLicenseRule

Creates a new license allocation rule.

New-QlikNode

Creates a new node in the cluster.

New-QlikProfessionalAccessGroup

Creates a new professional access group for license rules.

New-QlikRule

Creates a new system (security, license, load balancing) rule.

New-QlikStream

Creates a new stream.

New-QlikTable

Creates a table of resources with the specified properties.

New-QlikTag

Creates a new tag.

New-QlikTask

Creates a new reload task.

New-QlikTaskSchedule

Adds a new Reload Task Schedule Trigger

New-QlikUser

Creates a new user.

New-QlikUserAccessGroup

Creates a new user access group for license rules.

New-QlikUserDirectory

Creates a new user directory to sync user attributes.

New-QlikVirtualProxy

Creates a new virtual proxy configuration.

Publish-QlikApp

Publishes an app to a stream.

Publish-QlikObject

Publishes an app object (sheet/story) to the community.

Register-QlikNode

Registers a new node in the cluster and deploys certificates to it.

Remove-QlikAnalyzerAccessType

Deletes an analyzer access pass assignment.

Remove-QlikApp

Deletes an app.

Remove-QlikContentLibrary

Deletes a content library and its content.

Remove-QlikCustomProperty

Deletes a custom property and all assigned values.

Remove-QlikDataConnection

Deletes a data connection.

Remove-QlikExtension

Deletes an extension.

Remove-QlikNode

Removes a node from the cluster.

Remove-QlikObject

Deletes an app object’s metadata.

Remove-QlikProfessionalAccessType

Deletes a professional access pass assignment.

Remove-QlikRule

Deletes a system rule.

Remove-QlikSession

Kills the specified session on the specified Virtual Proxy

Remove-QlikStream

Deletes a stream.

Remove-QlikTag

Deletes a tag and removes it from all resources.

Remove-QlikTask

Deletes a task.

Remove-QlikTaskSchedule

Remove a specific Schdule from a reload task

Remove-QlikUser

Deletes a user.

Remove-QlikUserAccessType

Deletes a user access pass.

Remove-QlikUserDirectory

Deletes a user directory connection.

Remove-QlikVirtualProxy

Deletes a virtual proxy configuration.

Restore-QlikSnapshot

Select-QlikApp

Set-QlikCentral

Assigns the central node role to the specified node.

Set-QlikLicense

Sets the site license for the cluster.

Start-QlikTask

Triggers a task to start.

Switch-QlikApp

Replaces one app with another.

Sync-QlikUserDirectory

Triggers a user directory to be synced.

Unpublish-QlikObject

Unpublishes an app object from the community.

Update-QlikApp

Updates the properties of an app.

Update-QlikContentLibrary

Updates the properties of a content library.

Update-QlikCustomProperty

Updates a custom property definition.

Update-QlikDataConnection

Updates a data connection.

Update-QlikEngine

Updates the properties of an engine service.

Update-QlikExtension

Updates the properties of an extension.

Update-QlikNode

Updates the properties of a node.

Update-QlikObject

Updates the properties of an app object.

Update-QlikOdag

Updates ODAG configuration.

Update-QlikProxy

Updates the properties of a proxy service.

Update-QlikReloadTask

Updates a reload task.

Update-QlikRule

Updates a system rule.

Update-QlikScheduler

Updates the properties of a scheduler service.

Update-QlikServiceCluster

Updates the configuration of the cluster.

Update-QlikStream

Updates a stream.

Update-QlikUser

Updates the properties of a user.

Update-QlikUserDirectory

Updates the configuration of a user directory.

Update-QlikVirtualProxy

Updates a virtual proxy configuration.

Wait-QlikExecution

Waits for a task or execution session to finish.

http://adamhaydon.com/Qlik-Cli-Windows/
https://github.com/ahaydon/Qlik-Cli-Windows
 

你可能感兴趣的:(Qlik,Sense,qlik,sense)