Code:
$ThisMyArray
 For Each $Element In $ThisMyArray "PC1", "PC2", "PC3"

	  tcGetEvent($Element, $Task)  ; load the bad task data
          tcDefineTask("SUS=0")        ; (disable = 1, enable = 0)
          tcSetEvent($Element, $Task)  ; update the task on the target
          IF @ERROR <> 0
	       $RC = REDIRECTOUTPUT (failure.txt, 0)
	       ? $Element
	  Else if @ERROR = 0
	        $RC = REDIRECTOUTPUT (success.txt, 0)
	       ? $Element
	  Endif Endif

 Next


Hey anyone or Glenn,

I got this to work thanks so much. But my error trap works on all my other scripts but for somereason @ERROR keeps giving me false positves (back and forth whether a 0 or 1). Why? and how can I correct this. I like and need to see which PCs failed and which succeeded. This is crucial. Thanks guys

Happy New you to you all!
_________________________
Robert
A+, CCNA, MCP
Network Admin
Credit Union Wisconsin