14 Replies Latest reply on Jun 20, 2014 9:42 AM by Paul Seager-Smith

    Execute Powershell script via nexec

    Orhan Taskin

      Hello,

       

      I am trying to execute powershell script located on the server via nexec but it seems like script is hanging all the time. I tried a few variation but it is still the same.

       

      Examples:

       

      nexec -i serverabc.com cmd /c "powershell -InputFormat None C:/Temp/myscript.ps1 sample.string"

       

      nexec -i serverabc.com cmd /c "echo .|powershell C:/Temp\myscript.ps1 Say.Hello"

       

      Any help greatly appreciated.

       

      Thanks,