Good afternoon all
I have an issue with PowerShell and WinSCP.
Basically I have code which checks for replication on HyperV, then SCP the result to an SCP server.
So far the script works well, except when SCPing the file.
My code:
$transferResult =
$session.PutFiles("C:\Reports\*.htm", "/incoming/", $False, $transferOptions)
When the code is run, I get the following message :
Error: Exception calling "Check" with "0" argument(s): "Cannot create remote file '/incoming/FileName2022-01-12.htm'.
No such file or directory.
Error code: 2
Error message from server: No such file"
I have checked and verified that the SSH account do have write access to the specified account, and I have SCP'd successfully from another computer using Posh-SSH with the same account.
Thanking you for your assistance in this regard.