Giter Site home page Giter Site logo

mdtesting's Introduction

QlikView-CLI

About

QlikView-CLI is a PowerShell module that provides a command line interface for managing Qlik View environments.

As the Module is procedurally generated and provides PowerShell functions to interface with the QlikView QMSAPIs. These functions can be used for viewing and editing configuration settings, as well as managing tasks and other features available through the APIs.

IQMS4 Methods

The Mapping between QMSAPI Methods and the PowerShell Commandlets can be found here:

QMSAPI Method to Cmdlets

The QMSAPI Data objects included in this module can be found here:

QMSAPI DataObjects

To Do:

  • More detailed documentation around using the APIs
  • More examples
  • Common processes

Usage

Either place the Module Folder into C:\Program Files\WindowsPowerShell\Modules

or run Import-Module .\QlikView-CLI to import it manually.

Connecting to Qlik View

$Connection = Connect-QlikView [-Hostname ServerName][-credential Credentials] [-Version IQMS*] [-PassThru]

-Version can be used to connect to previous releases of QlikView.

  • IQMS: QlikView 11.20 and 12.00
  • IQMS2: QlikView 12.10
  • IQMS3: QlikView 12.30 (November 2018)
  • IQMS4: QlikView 12.40 (April 2019)

The QlikView Management Service API

If -PassThru is ommited from the Connect-QlikView command, the connection established will be a Global Connection that will be used for all subsequent API calls.

If -PassThru is added to the Connect-QlikView command it is not added as a Global Connection, and subsequent commands will require the Connection Object returned by the Connect-QlikView command.

Examples

Create new Source Directories and add Administrators

$SourceDirectories = "C:\QlikView\Dir1", "\\Server\Share\Directory"
$SourceDirectoriesAdministrators = "User1", "User2"

#Import the Module
Import-module .\QlikView-CLI

#Establish the connection
$Connection = Connect-QlikView
$Connection

#Get the QDS Settings
$QDS = Get-QVQDSSettings -Scope All
$NewDocFolders = [System.Collections.ArrayList]::new()

foreach ($SourceDir in $SourceDirectories)
{
	#Create the Folder General Properties
	$QVDocFolderGeneral = New-QVDocumentFolderGeneral -Path $SourceDir -Sendalertemailfordocumentadministrators $True -Type Source

	#Create the New Folder Object
	$QVDocumentFolder = New-QVDocumentFolder -Scope General -General $QVDocFolderGeneral

	#Add the new Folder to the QDS Settings
	$QDS.General.SourceFolders.Add($QVDocumentFolder)

	#And to the NewDocFolders as the Folder needs to be added to QDS before we can assign Admin
	$NewDocFolders.Add($QVDocumentFolder) | out-null
}

#Save the Updated QDS Settings
Save-QVQDSSettings -Qdssettings $QDS

#Process each of the New folders add the Admins to it.
foreach ($NewDocFolder in $NewDocFolders)
{
	foreach ($Admin in $SourceDirectoriesAdministrators)
	{
		Set-QVDocumentFolderAdministrator -Foldertype SourceDocumentFolder -Folderid $NewDocFolder.ID -Username $Admin
	}
}

mdtesting's People

Contributors

drowdemon avatar nillth avatar

Watchers

 avatar

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.