Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jun 2, 2021 2:35:51 PM
Sep 28, 2017 10:16:59 AM
Scenario:
! Note that the code is provided as is and will need to be modified to suit specific needs. For assistance, please contact the original creators of Qlik-Cli.
Connect-Qlik -computername "QlikSenseServer.company.com" # This will export the custom security rules and output them as secrules.json Get-QlikRule -filter "type eq 'Custom' and category eq 'security'" -full -raw | ConvertTo-Json | Out-File secrules.json # This will import secrules.json into a Sense site # The ideal use case would be to move the developedsecurity rules from one environment to another, so connecting to another Sense site would likely be needed here Get-Content -raw .\secrules.json |% {$_ -replace '.*"id":.*','' } | ConvertFrom-Json | Import-QlikObject
Qlik Sense Enterprise on Windows , all versions
Hi i try to use the above qlik-cli commands.
The export works well n oproblem, but when i try to import the security rules, i got the error
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:65 char:23
+ ... $result = Invoke-RestMethod @paramInvokeRestMethod @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Anyone an idea what the problem is and an idea how i can resolve this?
Hello @Jio
As we do not provide direct support for this tool, I would recommend that you contact the Qlik-CLI subject matter experts directly. You can do so here: https://github.com/ahaydon/Qlik-Cli-Windows/issues
All the best,
Sonja