Win7 PowerShell Could not load file or assembly winscpnet.dll
Hi, this is my first post.
I am from Mexico and this is my first try integrating WinSCP for an automation FTP tasks.
To this point I am successfully working with WinSCP and Win10 PowerShell script to upload and download files from an FTP server.
But I tried this on a Win7 PC and it is not working. Same WinSCP version and same PowerShell script. But when I tried to upload a file I got error:
I tried to install the assembly, with no success.
I am using this PowerShell script:
Any suggestion, please?
Best Regards
I am from Mexico and this is my first try integrating WinSCP for an automation FTP tasks.
To this point I am successfully working with WinSCP and Win10 PowerShell script to upload and download files from an FTP server.
But I tried this on a Win7 PC and it is not working. Same WinSCP version and same PowerShell script. But when I tried to upload a file I got error:
If I try to upload the file using the WinSCP program it works fine.Could not load file or assembly winscpnet.dll
I tried to install the assembly, with no success.
I am using this PowerShell script:
# Carga del ensamblado .NET para WinSCP add-type -Path 'C:\Program Files (x86)\WinSCP\WinSCPnet.dll' # Configuración de opciones de sesión $sessionOptions = New-Object WinSCP.SessionOptions -Property @{ Protocol = [WinSCP.Protocol]::Ftp HostName = "server" UserName = "user" Password = "pass" } $sessionOptions.AddRawSettings("AddressFamily", "1") $session = New-Object WinSCP.Session try { # Conexión $session.Open($sessionOptions) # Transferir archivos $session.GetFiles("/empa/EXIS_EMPA.xlsm", "C:\PEDIDO_EMPA\*").Check() } finally { $session.Dispose() }
Best Regards