Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
matteosilvestro
Contributor
Contributor

Import and export tasks via Qlik-Cli

Hi,

I'm trying to create a PowerShell script that can export and import all tasks in an environment using Qlik-Cli. I'm using the Import-QlikObject function, but I get the following error:

Invoke-RestMethod : The remote server returned an error: (400) Bad Request.

The code I'm currently using is:

Connect-Qlik -ComputerName $env:COMPUTERNAME -UseDefaultCredentials -TrustAllCerts
Get-QlikTask -full -raw | ConvertTo-Json | Out-File "tasks.json"
$Tasks = Get-Content -raw "tasks.json" | ConvertFrom-Json | Import-QlikObject

Am I doing something wrong? Is there a different and better way to export and import tasks?

Thanks.

Labels (1)
0 Replies