Post a reply

Options
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)

Options

Topic review

martin

Re: Adding Logging

The Session.SessionLogPath should be enough. Do not keep the high logging level and debug log on. That consumes too much resources.
remkop

Adding Logging

You can add logging via: https://winscp.net/eng/docs/library_session
$session.SessionLogPath = "C:\Temp\Scripts\Session.log"
$session.DebugLogLevel = 1
$session.DebugLogPath = "C:\Temp\Scripts\Debug.log"
remkop

How to enable Authentication logging

Hi, I use the basic example to upload file over SFTP.
I'm pretty sure I got all the correct settings like credentials and connections details. I used the same set for the command-line interface (and these are working).
When running the powershell-script I get this error; but I don't see any Authentication log or session log file...
Error: Exception calling "Open" with "1" argument(s): "Connection has been unexpectedly closed. Server sent command exit status 0.
Authentication log (see session log for details):
Using username "XXXXX".
Access denied.

Authentication failed."