Topic "PowerShell and XML Logging"

Author Message
[View user's profile]

Joined: 2013-07-24
Posts: 13
Location: Sunny Southern California
Hello, Group!

How do I enable XML logging in a PowerShell script? I know there must be a simple way to do this, but I'm just not seeing it.

Also, before pointing me to the documentation, please understand I've been all over the WinSCP site and have Googled for it.

Thank you,

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
How are you running WinSCP from your PowerShell script?

If you are using a WinSCP .NET assembly, it automatically turns on XML logging, as it uses the log to retrieve results. You can tell (or alter) a location of the log using Session.XmlLogPath. Though note that the assembly removes the log, once you call Session.Dispose. Anyway, if you are using the assembly, what do you need the XML log for? You get all the information from the assembly methods. That's actually a whole point of the assembly, to spare you from parsing the XML log.
Martin Prikryl

You can post new topics in this forum


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