Redirecting Console Output and Error Output to a Variable and E-mailing it

The author describes a script that runs a command-line app and takes all the output (including the error stream) and joins it into a string and then sends it in an email in this article.

http://www.sqlservercentral.com/blogs/nycnet/2012/08/28/powershell-redirecting-console-output-and-error-output-to-a-variable-and-e-mailing-it/