Re: cant figure out syntax
@ftps: This topic is about WinSCP .NET assembly API. You are using a 3rd party WinSCP PowerShell module. It has its own distinct syntax.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
-ftpsecure explicit
$WinSCPSession = New-WinSCPSession -SessionOption (New-WinSCPSessionOption -HostName ftp.XXXXXX.net -Protocol ftp -Credential $Credential -ftpsecure explicit) -SessionLogPath c:\temp\upload.log
< 2024-02-26 08:53:34.822 550-This server requires encryption.
< 2024-02-26 08:53:34.822 550 You must issue the AUTH command to change to an encrypted session before you can attempt to login.
SessionOptions.FtpSecure
:
Exception setting "Protocol": "Cannot convert null to type "WinSCP.Protocol" due to enumeration values that are not
valid. Specify one of the following enumeration values and try again. The possible enumeration values are "Sftp, Scp, Ftp, Webdav"."
$sessionOptions.Protocol = [WinSCP.Protocol]::FtpSecure
$sessionOptions.Protocol = [WinSCP.Protocol]::FtpSecure.Implicit
Ftp
will not do FTPS right? Help please.
$sessionOptions.SslHostCertificateFingerprint = "[fingerprint]"