Re: Open Call in Powershell not working
And can you connect with any other SFTP client? (i.e. does your SFTP server work at all?)
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
Session.Open
but I have not included it in the snippet as it never gets to run due.
# 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 = "sftp21-cmh.sumtotalsystems.com"
UserName = "cust_mmm_Dozuki"
Password = "YVCbf-X0"
SshHostKeyFingerprint = "ssh-rsa 2048 k8L86hrEaiZl+v/f+Wu1Lo/lgNuqkcWZqSi/iF1iKzl"
}
$session = New-Object WinSCP.Session
$session.SessionLogPath = "C:\Dozuki_Files\Scripts\_automatedScripts\winscp.log.txt"
try
{
# Connect
$session.Open($sessionOptions)
}
finally
{
$session.Dispose()
}