Hey, sorry for my bad english... i need to execute some periodic console applications that give me some results (on the console)... How can I execute it and have its return data sent to my email? I tried to use [Diagnostics.Process]::Start() and it launches my application but i don't know how to get the return... I do not want the exitCode, I want the text that the application prints on screen. Using PS V2 CTP3.
* UPDATE
The solutions presented worked fine but i have a problem... this application that i need to execute is gfix from the firebird database and now i discovered a thing, I can't redirect the output of gfix to a file, if i execute on command prompt the line:
gfix.exe -v -f dabatase.gdb > c:\test.txt
it print the output on the screen and the file is empty. Same thing if i try to assign it to a variable... i don't know what difference gfix has from the other console apps that i use, but looks like its output can't be redirected...
Has someone seeing this?
* UPDATE 2
Even if i use Start-transcript /Stop-Transcript, although on the screen i see the gfix output, on the file there is only the commands :/
* UPDATE 3
Found the solution here http://edn.embarcadero.com/br/article/25605