class PowershellRunner extends ProcessRunner {

  public static final String NAME = "PowerShell";
  public static final String TYPE = "text/powershell";
  public static final String[] EXTENSIONS = new String[] {"ps1"};

  @Override
  protected void doInit(String[] args) throws Exception {
    doRedirect(null, null);
  }

  @Override
  protected int doRunScript(String scriptFile, String[] scriptArgs, IRunner.Options options) {<FILL_FUNCTION_BODY>}

  @Override
  public boolean isSupported() {
    return Commons.runningWindows();
  }

  @Override
  public String getName() {
    return NAME;
  }

  @Override
  public String[] getExtensions() {
    return EXTENSIONS.clone();
  }

  @Override
  public String getType() {
    return TYPE;
  }
}

    File fScriptFile = new File(scriptFile);

//    String[] psDirect = new String[]{
//            "powershell.exe", "-ExecutionPolicy", "UnRestricted",
//            "-NonInteractive", "-NoLogo", "-NoProfile", "-WindowStyle", "Hidden",
//            "-File", fScriptFile.getAbsolutePath()
//    };

    String cmd = "cmd.exe";
    String[] args = new String[] {
      "/S", "/C", "type \"" + fScriptFile.getAbsolutePath() + "\" | powershell -noprofile -"
    };

    return super.doRunScript(cmd, args, options);
  
<methods>public non-sealed void <init>() ,public static transient void detach(java.lang.String[]) ,public static void detach(List<java.lang.String>) ,public java.lang.String[] getExtensions() ,public java.lang.String getName() ,public java.lang.String getType() ,public boolean isAbortSupported() ,public static transient java.lang.String run(java.lang.String[]) ,public static java.lang.String run(List<java.lang.String>) ,public static int runBlocking(List<java.lang.String>) ,public static transient java.lang.String runCommand(java.lang.String[]) throws java.io.IOException, java.lang.InterruptedException<variables>public static final java.lang.String[] EXTENSIONS,public static final java.lang.String NAME,public static final java.lang.String TYPE,private java.lang.Process process,private java.io.PrintStream stdErr,private java.io.PrintStream stdOut