PowershellCommandLineToolTask.

InvokePowershellCommand(string, ITaskItem, DataReceivedEventHandler, DataReceivedEventHandler) Method

Summary

Executes a powershell script.

Syntax

protected void InvokePowershellCommand(string powershellCommand, ITaskItem workingDirectory = null, DataReceivedEventHandler standardOutputHandler = null, DataReceivedEventHandler standardErrorHandler = null)

Parameters

Name Type Description
powershellCommand string The powershell command that should be executed.
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