Open session with site name in PowerShell script
I am a bit new to WinSCP. I am trying to automate and write a PowerShell script to open an SFTP site. I have saved the site info in the Site Manager and I am trying to open that session in my script with the
any advice would be great.. Thanks
open
command. For some reason when the script is run it will not find the site that is specified. for example:
# Needed for PowerShell 7.3 and newer $PSNativeCommandArgumentPassing = "Legacy" & "C:\Program Files (x86)\WinSCP\WinSCP.com" ` /log="E:\ChromeRiver\LOGS\WinSCP.log" /ini=nul ` /command ` "open ChromeRiverEU" ` "cd /files/export" ` "lcd E:\ChromeRiver" ` "get LNBR-OOP-PROD-YEWD*.xls" ` "exit"[/color]