Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: SessionOptions.AddRawSettings syntax for perl script

Figured it out. The perl script rawsettings should look like


SessionOptions.AddRawSettings syntax for perl script

I have built the sftp script in perl ( used the sample program from this site). Its currently failing with an error
". 2017-11-23 13:34:12.209 The first key-exchange algorithm supported by the server is diffie-hellman-group1-sha1, which is below the configured warning threshold.
. 2017-11-23 13:34:12.209
. 2017-11-23 13:34:12.209 Do you want to continue with this connection? ()
. 2017-11-23 13:34:12.209 Attempt to close connection due to fatal exception:
* 2017-11-23 13:34:12.209 Key-exchange algorithm diffie-hellman-group1-sha1 was not verified!
. 2017-11-23 13:34:12.209 Closing connection.
. 2017-11-23 13:34:12.209 Sending special code: 12
2017-11-23 13:34:12 ERROR OLE exception from "WinSCPnet":"

Would anyone know the syntax for adding the raw settings to sessionoptions in Perl please?

$sessionOptions->{'AddRawSettings'}->{'KEX'}=$consts->{'dh-group1-sha1'}; does not work.

So it'd been a long day... :oops: :oops: :oops:

The syntax is:


PowerShell Syntax for SessionOptions.AddRawSettings


Hoping you can help...I'm using the .NET assembly with PowerShell and need to add in some proxy settings. I'm using this example as a starting point:

I can't figure out the syntax I need to use in order to call the method from within PowerShell. For example if I specify:

$sessionOptions.AddRawSettings = ("ProxyMethod","3")

$sessionOptions.AddRawSettings = ("ProxyHost","PROXYSERVER")
$sessionOptions.AddRawSettings = ("ProxyPort","8080")

I receive an error of "Cannot set the Value property for PSMemberInfo object of type "System.Management.Automation.PSMethod".

I'm sure I'm missing something pretty simple here, can anyone point in the right direction to how I can call the RawSettings in to the $SessionOptions variable within my PowerShell script?