Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: powershell 5.0.10240.16384 error - unable to find type [WinSCP.Protocol]

It's Protocol, not Protcol.
lukegracie

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

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.

    # 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