Session "Open" with "1" argument(s): "Method not found

Advertisement

baltmann2
Guest

Session "Open" with "1" argument(s): "Method not found

Code generated by WinSCP. PowerShell 7.4.1 .NET 7.0.10
# Load WinSCP .NET assembly
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
 
# Set up session options
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
    Protocol = [WinSCP.Protocol]::Sftp
    HostName = "68.999.22.88"
    PortNumber = 22
    UserName = "WFXdrfgvmnd"
    Password = "asdfasdfasdf"
    SshHostKeyFingerprint = "ssh-ed25519 255 ImDzS3eYN48M4MGBfhaMd1IMZUy0CDIWgKxGObQoU0Q"
}
 
$session = New-Object WinSCP.Session
$session.SessionLogPath ="C:\cw_log\winscp\log.txt"
 
try
{
    # Connect
    $session.Open($sessionOptions)
 
    # Your code
}
finally
{
    $session.Dispose()
}

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum