Script to execute on target is the powershell script itself. Why is this not valid for you? What is the requirement to call the script and not have the script in the script box?
If you put something in the script arguments box (using your hidden string). You should be able to reference the arguments array.
Here is a sample of some timezone code I wrote today with 7 arguments passed in...
$date1 = New-Object System.DateTime $args, $args, $args, $args, $args, 0
$TZ1 = $args
$DTFormat = $args
$tz = [System.TimeZoneInfo]::FindSystemTimeZoneById("$TZ1");
$outputAdd = $output.AddSeconds($args)
$out = $outputAdd.ToString("$DTFormat")
I realize I wrote mine in there directly and did not export it to a separate PS1 file, but there was no need.
Can you do...
in your script field? And then make the argument a hidden string in the script arguments box?
It that does not work for you, you might investigate calling powershell directly through the windows execute activity, but I think it should work via powershell activity.
If nothing ends up working, I would suggest opening a case with TAC to capture the use-case for engineering.
Principal Engineer, CX