Error setting Session protocol to FTP
I'm trying to connect to an FTP server using PowerShell.
When I set the session parameters, it won't allow FTP:
My original syntax was this:
When I check the value of the protocol after, it is always SFTP.
Not sure what I'm doing wrong.
Any thoughts?
Thanks in advance!
Gary
When I set the session parameters, it won't allow FTP:
# Load the WinSCP .NET assembly Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll" # Initialize a new WinSCP session $sessionOptions = New-Object WinSCP.SessionOptions -Property @{ Protocol = Protocol.Ftp HostName = "myftp.com" # Your remote host UserName = "myname" Password = "mypass" }
My original syntax was this:
Protocol = [WinSCP.Protocol]::ftp
Not sure what I'm doing wrong.
Any thoughts?
Thanks in advance!
Gary