Home - QlikProfessionalServices/QlikView-CLI GitHub Wiki
Welcome to the QlikView-CLI wiki!
In order to connect to the QlikView-APIs the user account being used to establish the connection must be a member of the QlikView Management API security group.

If this group does not exist, it will need to be created and the User added to it. (This may require the user to log off and back on to apply)
If you want to use the QlikView-CLI module to run EDX tasks, you will also need to add the user to the QlikView EDX group

$Connection = Connect-QlikView [-Hostname ServerName][-credential Credentials] [-Version IQMS*] [-PassThru]
The Connect-QlikView command returns a QMS Client object, containing information about the QlikView Services. It is recommended that this object is captured in a variable as it can be used to supply information to subsequent API calls (e.g. ServiceID's)
$Connection = Connect-QlikViewSimply running the Connect-QlikView command on a QlikView Server will establish a global connection to the localhost using the Current User context.
All subsequent use of the QlikView-CLI Functions will use this Server connection by default.
Get-QVQMSVersionIf you use the -PassThru switch the Connect-QlikView the connection is not established as a global connection and all subsequent use of the QlikView-CLI functions will require the -Connection parameter to be used with the QMS Client object returned by the Connect-QlikView Command.
This will allow multiple server/cluster connections to operate in parallel
$QVClientTest = Connect-QlikView -Hostname QVClusterTest -Passthru
$QVClientProd = Connect-QlikView -Hostname QVCluster -Passthru
Get-QVQMSVersion -Connection $QVClientTest
Get-QVQMSVersion -Connection $QVClientProdGet-QVLicense [-Licensetype {Publisher | QlikViewServer}] [-Serviceid <guid>] [-Connection <QMS>] [<CommonParameters>]
After establishing a connection to QlikView
We can call the Get-QVLicense Function. This function requires the LicenseType to be provided as well as the ServiceID
$Connection = Connect-QlikView
Get-QVLicense -Licensetype Publisher
Get-QVLicense -Licensetype QlikViewServer -Serviceid $Connection.QlikViewServer.idStart-QVEDXTask [-qdsID <guid[]>] [-Tasknameorid <string>] [-Password <string>] [-Variablename <string>] [-Variablevalues <List[string]>] [-Connection <QMS>] [<CommonParameters>]
This command will find the Task with the Supplied Name or ID and run it. (include password if required)
The it returns a TriggerEDXTaskResult object that contains information on the EDXTask such as the Execution ID
Start-QVEDXTask -Tasknameorid TaskName
This can then be used to monitor the status of the EDX Task.
$QVEDXTask = Start-QVEDXTask -Tasknameorid TaskName
Get-QVEDXTaskStatus -Executionid $QVEDXTask.ExecID
In order to modify the QlikView settings. we need to first get the current settings
$QVSSettings = Get-QVQVSSettings -Scope All -qvsID $Connection.QlikViewServer.idfrom were we can navigate the QVSSettings object to see the values

and we can drill down on each of the objects such as the UserDocumentMounts

at this point we can modify the QVSSettings to add a new document mount.
we do this by running the command New-QVQVSMount with the appropriate parameters, adding the returned object to the UserdocumentMounts and saving the settings.

When we next call the Get-QVQVSSettings we can see the new User document mount has been added

