output from eventhandler

Advertisement

lduczmal
Joined:
Posts:
7

output from eventhandler

Hi,
I'm trying to modify example of event "FileTransfered" handler published as part of Session.SynchronizeDirectories Method powershell example. This handler use write-host cmdlet to display messages produced by the eventhandler. It works fine, but I need output from the handler futher in my main script so I need put this output to variable seen in main script. I tried to use "$script:variable" but it doesn't work: in eventhandler script block correct value is seen, but in main script it is empty. I can create temporary file from eventhandler, put there output message and finally read this file from main script but is isn't good solution.
Please help
Łukasz Duczmal

Reply with quote

Advertisement

You can post new topics in this forum