Page 2 of 2

Re: Powershell cmd output to Textbox

Posted: Fri Apr 05, 2013 11:50 am
by rkirchhof
I had a situation where try catch wasn't working. Try putting

Code: Select all

$ErrorActionPreference = “Stop”
before the command. Here's where I found it.

http://www.codesmartnothard.com/2011/07 ... rking.aspx

Re: Powershell cmd output to Textbox

Posted: Fri Apr 05, 2013 12:08 pm
by soccsupport
Agreed. Based on my further research and also trying the -erroractoin -stop try/catch; no luck.

In any case I really appreciate your help. Thank you. I learned more commands which is always cool in my book.