write-output "hello world" does not cause "hello world" to appear in the output.
Here is the script:
write-output "hello world"
throw "bye"
Here is the Output (error):
ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->System.Management.Automation.RuntimeException: bye ---> System.Management.Automation.RuntimeException: bye
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
Here is the Output:
08:40:21: Server->Execute path: C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe
08:40:21: Server->Executing Task process
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Assembly loaded: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Assembly loaded: System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Assembly loaded: System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->CreateService->Response channel created on address: /TaskProcess/376
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Requesting Task information
08:40:21: Server->Sending Task information
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Task information sent
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Task information received
08:40:21: Server->Task information sent
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Before PowerShell execution
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Assembly loaded: VisualCronAPI, Version=1.0.3.32953, Culture=neutral, PublicKeyToken=55f7a52402de1c04
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Before runspace.CreateRunspace
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 376)->Assembly loaded: Microsoft.PowerShell.Commands.Diagnostics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
08:40:21: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShell.exe" 3
I have attached the XML for the job:
Jobs.txt
(11kb) downloaded 28 time(s).Note that if I remove the throw, then "hello world" does appear in the Output (and all those timestamped lines do not).