I need to write a PowerShell script that reads some data and writes it to a file on a remote SFTP location. I'd rather not generate a local file first before initiating the SFTP session. Can WinSCP work with a byte array to send to the remote folder?
Asked
Active
Viewed 842 times
1 Answers
0
Use Session.PutFile
method (available since WinSCP 5.19).
For a similar question (just for a download), see:
Access remote file contents as a stream using WinSCP .NET assembly.

Martin Prikryl
- 188,800
- 56
- 490
- 992