Solved
Hi Martin, Thanks for that! The generator showed the error in my code path – it was around a try/catch sequencing issue.
Exception calling "PutFiles" with "4" argument(s): "Timeout waiting for WinSCP to respond"
At C:\temp\Folder\WinSCP-5.19.6-Automation\autoscript.ps1:40 char:5
+ $session.PutFiles("C:\temp\Folder\testusers_202202141 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : TimeoutException
-resumesupport=off
to the put
command:
$sessionOptions.AddRawSettings("SendBuf", "0")
in the script ok on $session.Open($sessionOptions)
so it doesn't solve the issue.
Session.SessionLogPath
. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.Exception calling "PutFiles" with "4" argument(s): "Timeout waiting for WinSCP to respond"
At \WinSCP-5.19.6-Automation\autoscript.ps1:34 char:5
+ $session.PutFiles("dir\test.csv
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : TimeoutException