Thanks, but not working. I got error
ExecuteProcess(Q:\VisualCron\\PowerShell\TaskPowerShell.exe 14407644)->System.Management.Automation.ParseException: At line:141 char:55
+ ... = $b.Replace("%SCRIPT%", {PATH(GetFileName|{TASK(Active|FilePath)})})
+ ~~~~~~~~~~~~~~~~~~~~~~~
Expressions are only allowed as the first element of a pipeline.
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
I suppose it is caused by launching PS1 script file from Visual Cron, not script text.
Pavel.