PowerShell script execution fails when ExecutionPolicy is set to AllSigned - Automic Agent
search cancel

PowerShell script execution fails when ExecutionPolicy is set to AllSigned - Automic Agent

book

Article ID: 443818

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Automic Windows jobs using PowerShell commands fail when the server environment enforces an ExecutionPolicy of AllSigned. This occurs because the Automation Engine generates temporary .ps1 files that are not digitally signed before execution. Users seeking to track the progress of the Request for Enhancement (RFE) for native script signing should reference the details below.

Environment

  • Product: CA Automic Workload Automation
  • Component: Windows Agent (All Versions)
  • OS: Windows Server

 

Cause

The Automic Agent processes PowerShell commands by creating a temporary .ps1 file on the agent machine. When the Windows ExecutionPolicy is set to AllSigned, the operating system prevents the execution of these temporary files because they lack a valid digital signature. Currently, the Automic Agent does not have a native mechanism to sign these dynamically generated scripts before execution.

Resolution

To allow jobs to execute PowerShell commands, configure the agent to bypass the execution policy for its own processes:

  1. Locate the agent initialization file (.ini).
  2. Update the ecpexe parameter in the [VARIABLES] section: ecpexe=powershell.exe -NonInteractive -ExecutionPolicy Bypass -NoLogo -file
  3. Restart the Automic Agent service.

 

Tracking RFE DE188970: A feature enhancement requested to dynamically sign temporary scripts and demand for this feature is being evaluated (DE188970).

 

 

Additional Information

For further assistance, see Contact Support. Scroll to the bottom of the page and click on your respective region.