I have read this page https://winscp.net/eng/docs/faq#scripting and either don't understand the relevant information or my problem is not covered.
I have generated a PS script from WinSCP GUI and when the script is run it works.
However, I need the PS script to run at a scheduled time daily, so called from Windows Task Scheduler. The task runs the PS script when not calling WinSCP.com command, but when included it launches WinSCP but the application does not execute as expected.
If I launch SysInternals' procexp I see WinSCP running and arguments provided - see attachment.
(hostkey="*" only for testing)
Is there something I am missing for WinSCP.com to execute properly.