How to use XML log with Powershell

Advertisement

justinchenjy@...
Guest

How to use XML log with Powershell

Hi support,

my OS: WIN2008
POWERTSHELL VERSION: V1.0
WINSCP VERSION: 5.92

i using below code is ok.
$sessionLogPath="C:\SinoPorject\Log\session.log"
$session.SessionLogPath = $sessionLogPath
$session.Open($sessionOptions)

i can got Log file.

but i use below code,

$sessionLogPath="C:\SinoPorject\Log\session.xml"
$session.SessionLogPath = $sessionLogPath
$session.Open($sessionOptions)

there are no xml file in the folder..
hoe to using XML log in powershell?

BR

Justin

Reply with quote

Advertisement

justinchenjy@...
Guest

Hi Support,

i try change code like below:

$sessionLogPath="C:\SinoPorject\Log\session.log"
$session.SessionLogPath = $sessionLogPath
$XMLLogPath="C:\SinoPorject\Log\session.xml"
$session.xmlLogPath = $XMLLogPath
$session.Open($sessionOptions)

it still have log type file without xml type file.


br

justin

Reply with quote

Advertisement

You can post new topics in this forum