Topic "powershell 5.0.10240.16384 error - unable to find type [WinSCP.Protocol]"

Author Message
lukegracie
[View user's profile]

Joined: 2014-11-19
Posts: 1
I'm just starting with WinSCP and Powershell. I've been using WinSCP in SSIS with much success - Thank you Martin! I can't seem to get started with Powershell. I'm on Windows 10 and Powershell 5 using the Windows Powershell ISE as an Administrator. I'm stuck using WinSCP 5.5.6 right now.

My test errors out right at the beginning.

Code:
    # Load WinSCP .NET assembly
    Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
   
    # Setup session options
    $sessionOptions = New-Object WinSCP.SessionOptions
    $sessionOptions.Protocol = [WinSCP.Protcol]::Sftp


Error: Unable to find type [WinSCP.Protcol].

Thanks for your help and pointing me in the right direction.

Luke
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
It's Protocol, not Protcol.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License