Skip to main content

Viewing Qlik Sense license definition allotments using PowerShell

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniele_Purrone
Support
Support

Viewing Qlik Sense license definition allotments using PowerShell

Last Update:

Apr 27, 2021 9:29:09 AM

Updated By:

Daniele_Purrone

Created date:

Apr 27, 2021 9:29:09 AM

The steps below allows for checking on the Qlik Sense signed license definition allotments using PowerShell.

 

Environment

 

1. Export client certificate and root certificate to make API calls
2. Open Windows PowerShell ISE on the Qlik Sense server
3. Run the following lines:

 
$hdrs = @{
    "X-Qlik-Xrfkey"="examplexrfkey123"
    "X-Qlik-User"="UserDirectory=INTERNAL; UserId=sa_api"
}

$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}

$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String((Get-Content C:\ProgramData\Qlik\Sense\Host.cfg)))

$license = Invoke-RestMethod -Uri "https://$($FQDN):9200/v1/licenses/definition?xrfkey=examplexrfkey123" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert

$license.allotments

 
4. An output similar to the following should display:

$license.allotments.png

Labels (1)
Version history
Last update:
‎2021-04-27 09:29 AM
Updated by: