Hello,
I have a version of the code I'm using:
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Sftp
HostName = "1*.***.***.*0"
UserName = "a*****1"
Password = "m*********9"
SshHostKeyFingerprint = "ssh-ed25519 255 eeDKU******************************UNg="
}
$session = New-Object WinSCP.Session
$session.SessionLogPath = "C:\Users\FMV\Documents\logging.log"
try
{
# Connect
$session.Open($sessionOptions)
# Your code
# From VM to Laptop
$session.GetFiles("full***********.csv", "C:\Users\fmv\Downloads\" )
}
finally
{
$session.Dispose()
}
And in attach the logs.
I was able to test this code on a VM that I created especially for this issue. Everything works.
VM TEST:
– WinSCP Version 5.19.2
– rsa2
– Command: working
– Powershell Script: working
PROD:
– WinSCP Version 5.17.10
– ssh-ed25519
– Command: working
– PowerShell Script: fails
Can the hotkey be the problem?
Last edited by francesco84mantovani@gmail.com on 2021-09-22 15:21; edited 1 time in total
Description: Logs on test VM environment
Description: Logs on PROD (masqued)