Fix FTP Connection Error #29

Merged
OCram85 merged 3 commits from fixWinSCP into master 2018-03-26 13:01:34 +02:00
Showing only changes of commit e1976bd2fe - Show all commits

View File

@ -182,8 +182,8 @@ function Connect-To {
FtpMode = 'Passive' FtpMode = 'Passive'
} }
try { try {
$FTPSessionOption = New-WinSCPSessionOption @FTPSessionOption $FTPSessionOption = New-WinSCPSessionOption @WinSCPConParams
$Global:WinSCPSession = New-WinSCPSession @WinSCPConParams $Global:WinSCPSession = New-WinSCPSession @FTPSessionOption
} }
catch { catch {
throw "Could not connect to {0} using {1} protocol!" -f $RemoteHost, $Type throw "Could not connect to {0} using {1} protocol!" -f $RemoteHost, $Type