This project is read-only.

HowTo: Grab powershell output?

Jun 20, 2011 at 7:22 PM

any idea how we can log the the output of the powershell task?


this way is too explicit:


$log.LogMessage([Microsoft.Build.Framework.MessageImportance]"High", "Hello from PowerShell! Now adding {0} and {1}.", $first, $second)

if ($first + $second -gt 100) { 
	$log.LogError("Oops! I can't count that high. :(") 
$sum = $first + $second 

how can we just get the output from other instructions? or everything we would get in a normal console?

Oct 11, 2011 at 11:34 AM