Topic "PowerShell Syntax for SessionOptions.AddRawSettings"

Author Message
pidge_84
[View user's profile]

Joined: 2013-05-09
Posts: 2
Hi,

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:

https://winscp.net/eng/docs/library_session_listdirectory#powershell

I can't figure out the syntax I need to use in order to call the https://winscp.net/eng/docs/rawsettings method from within PowerShell. For example if I specify:

Code:

$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?

Cheers,

Dave
pidge_84
[View user's profile]

Joined: 2013-05-09
Posts: 2
So it'd been a long day... Embarassed Embarassed Embarassed

The syntax is:
Code:

$sessionOptions.AddRawSettings("ProxyMethod","3")
$sessionOptions.AddRawSettings("ProxyHost","PROXYSERVER")
$sessionOptions.AddRawSettings("ProxyPort","8080")
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License