Topic "SessionRemoteException Class"

Author Message
[View user's profile]

Joined: 2013-09-17
Posts: 1
Location: United States
I am attempting to retrieve exceptions when the fails.

I was hoping to do something as simple as

$SessionRemoteException = $Session.Open($SessionOptions).Check()

Write-Host $SessionOpenException.Exception.Message

I am struggling. Any assistance is appreciated

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26299
Location: Prague, Czechia
The Session.Open throws an exception on its own. You need to catch it.
See try ... catch statement in this example:
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License