Error dynamic folder with powershell and code signing

Hello,

I have a question according this dynamic folder script: toolbox/Dynamic Folder/Wallix Bastion/Wallix Bastion (PowerShell).dyncred-script.autogen.ps1 at master · royalapplications/toolbox · GitHub

I am back into this topic and run into an issue again. I know that I can swith to environment variables and sign the script, so it can be run even if the execution policy is “AllSigned”. Unfortunately I can’t see how to switch these two lines to environment variables?

$WallixUsername = ‘$Target.CustomField1$:$EffectiveUsername$’
$WallixPassword = ‘$EffectivePassword$’

Maybe someone can give me a hint?
Password should be $WallixPassword = $env:DynFolder_EffectivePassword

but what about the WallixUsername?

Just a quick addition. It seems to be another issue. After setup the dynamic folder script it runs once. But after closing RoyalTS and opening it again, I get the message that the scrip is unsigned.

I compared the .rdfx file before and after and cant find any difference.

I can’t really think of anything which could break this. Maybe some encoding issue? In our tests, this actually worked quite well with signed scripts and switching to environment variables. If you can isolate the issue with a sample script, you can open a support ticket and we can have a look at it.