Call WinSCP Saved Session
Is there a way to call the WinSSP saved session and not have WinSCP launch in the foreground. I have a PowerShell script that currently makes a SFTP call to a site; however, I'm needing to use a proxy now. So, I thought that the easiest way would be to create a session in WinSCP then call that saved session from my script. My call line is a
What this does is launch the WinSCP GUI, logged me into the site, and then stopped. Is there a command switch to run a batch file? My previous process was running psftp and I had the command line arguments for the batch file. Can WinSCP take parameters to run a batch file?
Start-Process -FilePath "C:\Program Files...\..\WinSCP.exe" -ArgumentList "SiteName" -Wait -NoWindow