GithubHelp home page GithubHelp logo

boristyukin / qv-user-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from msheraton/qv-user-manager

0.0 1.0 0.0 281 KB

Handles QlikView CALs and DMS user authorizations. Note: QV10SR4 is currently the only fully supported version due to bugs in the API in previous versions. Also for QV11 the API has changed so it must be recompiled with some adjustments.

License: MIT License

PowerShell 0.82% C# 99.18%

qv-user-manager's Introduction

About

Screenshot of example application

qv-user-manager for QlikView 10 is able to automate the process of assigning and removing CALs and retrieve information such as when the CALs were last used in a CSV format, which is simple to read for QlikView. It can also populate DMS users and retrieve information in a similar CSV format. It automatically recognizes all available QlikView Servers and can work against the entire server(s) or specific document(s).

Don't fear the command line! With console redirection and piping support this little tool can with minimal effort be used to for example assign CALs from an Active Directory group or populate DMS users from an SQL Server among other things. See examples below. It's all dynamic and extendable, create your own modules if you whish.

This project aim to both demonstrate and inspire how to work with the QlikView Management Service (QMS) API while at the same time being a useful and fully working example of what can be done.

Help screen

Usage: qv-user-manager [options]
Handles QlikView CALs and DMS user authorizations.

Options:
  -l, --list=CAL|DMS|DOCS    List CALs, users or documents [CAL|DMS|DOCS]
  -a, --add=CAL|DMS          Add users or assign CALs [CAL|DMS]
  -r, --remove=CAL|DMS       Remove specified users or inactive CALs [CAL|DMS]
  -d, --document=VALUE       QlikView document(s) to perform actions on
  -p, --prefix=VALUE         Use specified prefix for all users and CALs
  -V, --version              Show version information
  -?, -h, --help             Show usage information	

Options can be in the form -option, /option or --long-option

Configuration

Add the user that is executing the tool to the "QlikView Management API" Windows group. This group does not exist by default and must be created. Restart the computer or log out and back in again to let Windows update the groups.

Change the line below in qv-user-manager.exe.config file to reflect the server address of your QlikView Management Service.

<endpoint address="http://sesth-rfn1:4799/QMS/Service" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IQMSBackend" contract="QMSBackendService.IQMSBackend"
name="BasicHttpBinding_IQMSBackend" behaviorConfiguration="ServiceKeyEndpointBehavior" />

It's recommended to schedule and run the tool from a batch file, see below for examples.

Examples

Examples for populating DMS users:

:: Add DMS users to Films.qvw from a textfile containing users
qv-user-manager.exe --add dms --document Films.qvw < C:\Temp\users.txt

:: Add DMS users to Films.qvw AND Presidents.qvw from a textfile containing users
qv-user-manager.exe --add dms --document Films.qvw;Presidents.qvw < C:\Temp\users.txt

:: Add DMS users to all available documents from a textfile containing users
qv-user-manager.exe --add dms < C:\Temp\users.txt

:: Add DMS users to all available documents where a user is specified on commandline and prefixed
echo rfn | qv-user-manager.exe --add dms --prefix QTSEL\

Examples for listing DMS users:

:: List DMS users for all documents on all available QVS to a semicolon separated file
qv-user-manager.exe --list dms > dmsusers.csv

:: List DMS users for Films.qvw on all available QVS to a semicolon separated file
qv-user-manager.exe --list dms --document Films.qvw > dmsusers.csv

Examples for removing DMS users:

:: Remove DMS users for all documents on all available QVS matching usernames in a textfile
qv-user-manager.exe --remove dms < C:\Temp\Users.txt

:: Remove ALL DMS users for all documents on all available QVS
qv-user-manager.exe --remove dms

:: Remove DMS users for Films.qvw on all available QVS where a user is specified as parameter
echo rfn | qv-user-manager.exe --remove dms --document Films.qvw

Example for listing CALs:

:: List Named CALs and DocumentCALs on all available QVS to a semicolon separated file
qv-user-manager.exe --list cal > cals.csv

Example for removing CALs:

:: Remove all inactive CALs (inactive > 30 days)
qv-user-manager.exe --remove cal

PowerShell examples:

:: Add CALs from Active Directory group (script takes group and property as parameters)
.\extras\PSEnumGroup.ps1 "CN=DL- Nordic All,OU=DL,OU=Activate Groups,DC=qliktech,DC=com" sAMAccountName | .\qv-user-manager.exe --add cal --prefix QTSEL\

:: Add Document CALs from an SQL Server (edit connection string in the script file)
.\extras\get-sqlusers.ps1 "SELECT users FROM table" | .\qv-user-manager.exe --add cal --document Films.qvw --prefix QTSEL\

:: Populate DMS users from an XML file (edit the script to match XML format)
.\extras\get-xmlusers.ps1 .\examples\users-example.xml | .\qv-user-manager.exe --add dms

Note: By default PowerShell has scripting support disabled. To change the script execution policy, use the Set-ExecutionPolicy cmdlet and change it to 'unrestricted'. See the link below for more detailed instructions.

http://www.tech-recipes.com/rx/2513/powershell_enable_script_support/

Example how to run from a QlikView script:

EXECUTE cmd.exe /C "qv-user-manager.exe --list cal > cals.csv"; 

Directory;
LOAD UserName, 
 	LastUsed, 
 	QuarantinedUntil,
 	Document,
 	Server
FROM
cals.csv
(txt, codepage is 1252, embedded labels, delimiter is ';', msq);

License

This software is made available "AS IS" without warranty of any kind under The Mit License (MIT). QlikTech support agreement does not cover support for this software.

Meta

qv-user-manager's People

Contributors

braathen 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.