-
Notifications
You must be signed in to change notification settings - Fork 51
Advanced Usage
Adam Haydon edited this page Jun 26, 2019
·
3 revisions
Once the work-flow is worked out for connecting to a Qlik Sense site, you can use the basic functionality to allow for operations across Qlik Sense sites or tiers.
Examples:
Connecting to one Qlik Sense site, exporting all the apps with a specified CustomProperty, then importing those apps into another site and publishing them:
PS C:\Temp>Get-PfxCertificate .\qlikserver01-client.pfx | `
Connect-Qlik -ComputerName qlikserver01.domain.ad -UserName INTERNAL\sa_api -TrustAllCerts
PS C:\Temp>Get-QlikApp -filter "customProperties.value eq 'Yes'" | `
foreach {Export-QlikApp -id $_.id -filename "$($_.name).qvf"}
PS C:\Temp>Get-PfxCertificate .\qlikserver02-client.pfx | `
Connect-Qlik -ComputerName qlikserver02.domain.ad -UserName INTERNAL\sa_api -TrustAllCerts
PS C:\Temp>Get-ChildItem -Recurse -Filter *.qvf | `
foreach {Import-QlikApp -file $_.Fullname-name $_.Basename -upload} | `
Publish-QlikApp -stream ExampleStream
Once there is comfort with pipelines, then chains of pipelines can be constructed to do multiple operations with a low amount of scripting.
Example:
We are getting all tasks which are associated with apps in a given string, starting those tasks, and waiting for their execution:
Get-QlikReloadTask -filter "app.stream.name eq 'Monitoring Apps'" | Start-QlikTask -Wait | Wait-QlikExecution