Henrik
Thanks - very impressive turn around with the fix!
I tried this version and it does exactly as you suggested - fails the task whenever STDERR contains any output - perfect! Now, what I need to figure out is how to stop PoSh writing output to STDERR when there isn't an error!
I also noticed that the STDERR log is being written twice in this version - separated by the text "Exception in Task':
===============
2011-08-31/11:39:38.758 0001/0001 PPCS8005I Application C:\isis_V72\pdew3700\pdew3.exe started (with PCSDLL cleanup enabled, PCSDLL date: '2011-05-18 (build:7.02.0.11201)'). [pcsdll\pcs.cpp,420]2011-08-31/11:39:38.778 0001/0001 PPCS8006I Commandline parameters: R:\ISIS_RES\docdef\VIPTemplates.prj /DocDef [pcsdll\pcs.cpp,429]
2011-08-31/11:39:38.778 0001/0001 PPCS8010I ISIS STARTER, Version V.7.02/w3 of '2011-05-18 (build:7.02.0.11201)' [interf\modctrl.hpp,33]
2011-08-31/11:39:38.778 0001/0001 PPCS8020I Windows/Intel (x86) 32 bit [interf\modctrl.hpp,34]
2011-08-31/11:39:38.778 0001/0001 PPCS8030I (C) Copyright ISIS Papyrus Software AG 1997-2011 [interf\modctrl.hpp,35]
2011-08-31/11:39:38.778 0001/0001 PPCS0226I Set ISIS_PCS_LOGMODE=M,S7 [pcsdll\pcsapp.cpp,438]
2011-08-31/11:39:38.778 0001/0001 PPCS8002I PCSDATA c__isiscommv7_w3_ISIS_PCS_20110315_ShMem_PCSDATA on address 01DF0000 used. [pcsdll\pcs.cpp,567]
2011-08-31/11:39:39.842 0001/0004 PPCS0226I Set ISIS_PCS_LOGMODE=M,S7 [pcsdll\pcsapp.cpp,438]
2011-08-31/11:39:40.232 0001/0004 PPST9991I 2011-08-31/11:39:38;00:00:02;RC=0;DE;NO Inputfile;NO Targetfile;0;; [starter\dllthre.cpp,2734]
2011-08-31/11:39:40.322 0001/0001 PPCS8099I Application end. [pcsdll\pcs.cpp,778]
Exception in Task:
2011-08-31/11:39:38.758 0001/0001 PPCS8005I Application C:\isis_V72\pdew3700\pdew3.exe started (with PCSDLL cleanup enabled, PCSDLL date: '2011-05-18 (build:7.02.0.11201)'). [pcsdll\pcs.cpp,420]2011-08-31/11:39:38.778 0001/0001 PPCS8006I Commandline parameters: R:\ISIS_RES\docdef\VIPTemplates.prj /DocDef [pcsdll\pcs.cpp,429]
2011-08-31/11:39:38.778 0001/0001 PPCS8010I ISIS STARTER, Version V.7.02/w3 of '2011-05-18 (build:7.02.0.11201)' [interf\modctrl.hpp,33]
2011-08-31/11:39:38.778 0001/0001 PPCS8020I Windows/Intel (x86) 32 bit [interf\modctrl.hpp,34]
2011-08-31/11:39:38.778 0001/0001 PPCS8030I (C) Copyright ISIS Papyrus Software AG 1997-2011 [interf\modctrl.hpp,35]
2011-08-31/11:39:38.778 0001/0001 PPCS0226I Set ISIS_PCS_LOGMODE=M,S7 [pcsdll\pcsapp.cpp,438]
2011-08-31/11:39:38.778 0001/0001 PPCS8002I PCSDATA c__isiscommv7_w3_ISIS_PCS_20110315_ShMem_PCSDATA on address 01DF0000 used. [pcsdll\pcs.cpp,567]
2011-08-31/11:39:39.842 0001/0004 PPCS0226I Set ISIS_PCS_LOGMODE=M,S7 [pcsdll\pcsapp.cpp,438]
2011-08-31/11:39:40.232 0001/0004 PPST9991I 2011-08-31/11:39:38;00:00:02;RC=0;DE;NO Inputfile;NO Targetfile;0;; [starter\dllthre.cpp,2734]
2011-08-31/11:39:40.322 0001/0001 PPCS8099I Application end. [pcsdll\pcs.cpp,778]
=======================================