Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ANBIS
Contributor II
Contributor II

Update Stream Custom Properties with Powershell and Qlik-CLI

Hi,

i am currently working on a Powershell Script, using Qlik-CLI module, to add a Custom Properies to a Stream.

Using the script below, i run into "(400) Bad Request" error, no matter what kind of datatype i use for the "-customProperties" parameter.

I also tried the following with the same outcome: 

- set the values manually within the QMC

- get the custom Properties into a powershell variable

- delete the Properties within the QMC

- Try to set the values saved in the variable.

$OldCustomProperies = $(get-qlikstream -full -filter $("name eq '"+$Streamname+"'")).customProperties

Update-QlikStream -verbose -id $streamguid -customProperties $OldCustomProperies

That is how the Custom Property Array should look:

Custom properties issue 1.jpg

Does anybody know how to use "Update-QlikStream -verbose -id $streamguid -customProperties $CustomProperies"?

Is there anything i miss here or is there a better way to do this with Qlik .net SDK within Powershell?

Thank you in advance for your help.

 

Labels (1)
1 Solution

Accepted Solutions
Vincenzo_Esposito

First of all you need to have the custom property defined for a resource type Stream. You can either define it using the Qlik-Cli or QMC.

You need to get the stream id and use it in the update action, or if you want to use a single line

 Update-QlikStream -id (get-qlikstream -full -filter ("name eq 'Everyone'")).id -customProperties cli=B 

For the above command to work I defined a custom Properties named cli with values A,B,C

 

Hope this help

 

 

View solution in original post

2 Replies
Vincenzo_Esposito

First of all you need to have the custom property defined for a resource type Stream. You can either define it using the Qlik-Cli or QMC.

You need to get the stream id and use it in the update action, or if you want to use a single line

 Update-QlikStream -id (get-qlikstream -full -filter ("name eq 'Everyone'")).id -customProperties cli=B 

For the above command to work I defined a custom Properties named cli with values A,B,C

 

Hope this help

 

 

ANBIS
Contributor II
Contributor II
Author

Thank you very much for your help, it does work now!