public void StartPowerShell() {
if (IsProcessRunning) processInterace.StopProcess();
//_IsPowerShell = true;
processInterace.StartProcess("powershell.exe", "-NoLogo -NonInteractive -WindowStyle Hidden -ExecutionPolicy Unrestricted");
Invoke((Action)(() => {
richTextBoxConsole.ReadOnly = false;
}));
//ClearOutput();
//// Are we showing diagnostics?
//if (ShowDiagnostics) {
// WriteOutput("Preparing to run " + fileName, Color.FromArgb(255, 0, 255, 0));
// if (!string.IsNullOrEmpty(arguments))
// WriteOutput(" with arguments " + arguments + "." + Environment.NewLine, Color.FromArgb(255, 0, 255, 0));
// else
// WriteOutput("." + Environment.NewLine, Color.FromArgb(255, 0, 255, 0));
//}
//// Start the process.
//this._cmdhandle = processInterace.StartProcess(fileName, arguments);
//// If we enable input, make the control not read only.
//if (IsInputEnabled)
// richTextBoxConsole.ReadOnly = false;
}