How to set up a Windows Agent to run Powershell jobs

Discussion created by Mitch_Denis_38 on Feb 8, 2013
Latest reply on Dec 1, 2017 by Michael_Lowry
The information below can also be found in our Knowledge Base (KB0010526). Detailed Description and Symptoms By default, a Windows Agent cannot run powershell scripts unless it's through a .bat file or command that can be run at the Windows command line.  Below are instructions on setting up a Windows Agent to have a Powershell interpreter. Investigation Setting up the interpreter: 1) Find the path to powershell.exe that will be used.  Please note, a 32-bit agent can only use 32-bit powershell which is found (by default) in the C:\WINDOWS\SysWOW64\windowspowershell directory. 2) Open the agent's ini file and in the [GLOBAL] section, change the ECPEXE setting to the full path to powershell.exe.  Change the ECPEXT setting to ps1.  An example is below: ECPEXE=C:\WINDOWS\SysWOW64\windowspowershell\v1.0\powershell.exe ECPEXT=ps1 3) Restart the agent Solution Running a job on the interpreter To run a job on the Windows Agent using the interpreter, open the Windows job and go to the WINDOWS tab.  Under "Type", choose "Interpreter". Any JCL or command that is put into the Pre-Process or Process tab will now be run in Powershell rather than via Windows command line.