I have set up a script to run after a back up is done on the "Post Job Activity" the command calls for c:\users\ben\desktop\test.cmd the cmd file has the command
the powershell script is executed correctly but the console does not open so I can see the output from the script. Is there a way to call the script from veeam and be able to see the console so I can see the write-host output of the powershell script?
v.Eremin wrote:You mean you want to see the PS pipeline and what is output to it during script execution? Thanks.
Correct, I would like to see the output during script execution. The scrip copies my backups to an external drive and while it is executing I have not idea of how far in the process the script is. So how do I see output during script execution?
Can you try to run this very command from the command line ("Run")? Will you see corresponding PS window or not? Does adding -noexit parameter make any difference (start powershell.exe -noexit)? Thanks.
I have tried to use (start powershell.exe -noexit) but I still don't see the output. I can tell the script is running because under task manager I see the process but I don't see a window with output. If I double click the cmd file that calls (start powershell.exe) I see the window but not when called by Veeam from the Post Job Activity.
Checked it with Process Explorer. Powershell is executed as service account as expected and it is not possible to bring the window to the front. Again I would advise you to write to a log file in your script.
Then from another window you can monitor the process with the tail and wait option in powershell v3
Get-Content -Tail 10 -wait E:\logs\jobjob.log
Apparently (if you are not using v3), you can find a similar command in the ps community extensions: