Detailed Description and Symptoms
By default, Windows agents cannot run Powershell scripts unless it's through a .bat file or command that can be run from the Windows command line. Below are instructions on setting up Powershell as an interpreter for Windows agents. As of V11.1 of the Automation Engine, this can be set up globally, no configuration of individual agents is required.
Note: All agents on which this feature is used must also be V11.1 or higher.
In client 0, add a line to the variable UC_EXT_INTERPRETERS_WINDOWS in folder DIV_VARIABLES:
Key = POWERSHELL
Value 1 = .ps1
Value 2 = powershell.exe <FILE>
Ensure that the path to powershell.exe is included in the Windows PATH variable on all machines where Powershell scripts will be run.
If these are Agents upgraded in place (not new .ini files), please make sure the following lines are added in the global section:
ECPEXE=powershell.exe -NonInteractive -ExecutionPolicy bypass -NoLogo -file
In versions before 11, the default for both parameters will be blank:
Use the following statements in the Process tab of a Windows job in order to use the Powershell interpreter (example):
Test-NetConnection -ComputerName "<Automation Engine Server>" -Port 2217 -InformationLevel "Detailed"
powershell.exe -file C:\testscript.ps1