Topic "Session in powershell"

Author Message
Fady01

Guest


Hello,

I would like to know how I can call a session that i have already register in the winscp GUI

All exemple that I found require to spefify the session configuration in the powershell script :

# Setup session options
$sessionOptions = New-Object WinSCP.SessionOptions
$sessionOptions.Protocol = [WinSCP.Protocol]::Sftp
$sessionOptions.HostName = "example.com"
$sessionOptions.UserName = "user"
$sessionOptions.Password = "mypassword"
$sessionOptions.SshHostKeyFingerprint = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

$session = New-Object WinSCP.Session

try
{
# Connect
$session.Open($sessionOptions)


Any help would be appreciate
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
You cannot (at least not in any documented and reliable way), the assembly by purpose runs independently from the GUI configuration.
_________________
Martin Prikryl
jorgea
[View user's profile]

Joined: 2013-08-20
Posts: 2
Location: United States
It looks like you cannot do this
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