PowerShell and XML Logging

Advertisement

JasonRkr
Joined:
Posts:
13
Location:
Sunny Southern California

PowerShell and XML Logging

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,

Jason

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: PowerShell and XML Logging

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.

Reply with quote

Advertisement

You can post new topics in this forum