PowershellCommandLineToolTask.

InvokePowershellFile(string, ITaskItem, DataReceivedEventHandler, DataReceivedEventHandler) Method

Summary

Executes a powershell script.

Syntax

protected void InvokePowershellFile(string powershellFile, ITaskItem workingDirectory = null, DataReceivedEventHandler standardOutputHandler = null, DataReceivedEventHandler standardErrorHandler = null)

Parameters

Name Type Description
powershellFile string The full path to the powershell script.
workingDirectory ITaskItem The full path to the working directory.
standardOutputHandler DataReceivedEventHandler The event handler that handles the standard output stream of the command line application. If no value is provided then all messages are logged.
standardErrorHandler DataReceivedEventHandler The event handler that handles the standard error stream of the command line application. If no value is provided then all messages are logged as errors.

Return Value

Type Description
void