Start a new topic
Solved

Creating script Parameters in Powershell connector using dynamic folders

I am trying to create a powershell connector with a dynamic folder.

I already have the code available to retrieve credentials dynamically.

I have also successfully created the connector using a raw jSON connector.


I need to create 2 script paramters but the documentation is not clear on the syntax and I could not find an example in the repo.


I know the snippet below works when I created it in my raw jSON format.

I manually created the Parameters in the second tab and mapped those 2 parameters to the $EffectiveUsername$ and $EffectivePassword$ tokens.

And then I went to the Test tab and tested successfully.


"Script": "#Get RoyalTS Creds

param (

 [string] $userdn,

 [string] $userpw

 )


$user = $uid

$userpass = $userpw

.....


However when I referred to the online documentation

https://docs.royalapps.com/r2021/scripting/objects/connections/royalpowershellconnection.html#parameters


Parameters

Type: string, Default Value: Empty String
The script parameters to pass on to the script.


It does not provide any sample syntax. Most of the parameters in the doco are clear, for example:

"Script" : "# powershell code......."

It is only the parameter and a value.

And I have figured out how to format extended Properties into a block.


However, the Parameters are a series of custom_parameter_name and parameter_Value grouped in the Parameters section of the Powershell-> Script block. I have tried multiple varieties of syntax of formatting but without a reference, it is impossible to script this key part of my script.


Thank you

Login or Signup to post a comment