Start a new topic
Solved

Cannot pass multipe parameters to PowerShell command

Hi,


I can't seem to pass username and password to a powershell script properly.


I setup a task like this:




-NoProfile -NoExit "$user = '$EffectiveUsername$';$pass = '$EffectivePassword';(echo $user $pass)"


This only returns the password, does not return username.


If I set this to:


-NoProfile -NoExit "$user = '$EffectiveUsername$';$pass = '$EffectiveUsername$';(echo $user $pass)"


This returns the username twice as expected, no problems. (NOTE, both variables are are set to return username).


However, this works as expected:

-NoExit echo $EffectiveUsername$ $EffectivePassword$


Bug? Am I missing something?






1 Comment

Hi Jon,


token resolution should work for the command, assuming that the document is not locked down:

https://content.royalapplications.com/Help/RoyalTS/V4/index.html?tutorials_workingwithlockdowndocument.htm


If your document is not locked down, it would be best to open a new support ticket and send us a sample document with the task configuration:

https://support.royalapplications.com/support/tickets/new


Regards,
Stefan

Login or Signup to post a comment