Re: Got Correct .NET Assembly (I Think)
Got it working now. Thanks!
WINSCP_PATH
environment variable to point to the newly installed DLL in the netstandard2.0
folder, and re-launched my PowerShell script.
Write-Error: Exception calling "Open" with "1" argument(s): "SessionOptions.Protocol is Protocol.Sftp or Protocol.Scp, but SessionOptions.SshHostKeyFingerprint is not set."
SshHostKeyFingerprint
the message refers to?
session.open()
. The code:
$sessionOptions
$session.open($sessionOptions) # Connect to server
$sessionOptions
:
Name : Dick@Solomon
Protocol : Sftp
HostName : Solomon
PortNumber : 0
UserName : Dick
Password : xxx [masked for security]
SecurePassword : System.Security.SecureString
NewPassword :
SecureNewPassword :
Timeout : 00:00:15
TimeoutInMilliseconds : 15000
PrivateKeyPassphrase :
SecurePrivateKeyPassphrase :
RootPath :
Secure : False
SshHostKeyFingerprint :
SshHostKeyPolicy : Check
GiveUpSecurityAndAcceptAnySshHostKey : False
SshPrivateKeyPath :
SshPrivateKey :
SshPrivateKeyPassphrase :
FtpMode : Passive
FtpSecure : None
WebdavSecure : False
WebdavRoot :
TlsHostCertificateFingerprint :
GiveUpSecurityAndAcceptAnyTlsHostCertificate : False
TlsClientCertificatePath :
Write-Error: Exception calling "Open" with "1" argument(s): "Method not found: 'Void System.Threading.EventWaitHandle..ctor(Boolean, System.Threading.EventResetMode, System.String, Boolean ByRef, System.Security.AccessControl.EventWaitHandleSecurity)'."