Setting up a Windows Agent to run Powershell jobs
search cancel

Setting up a Windows Agent to run Powershell jobs

book

Article ID: 88318

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

This article will outline what must be done to use powershell commands within a windows job using the BEGIN_EXT_INTERPRETERS

Environment

Automic Automation any version

Resolution

Configuration

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.

Follow the additional steps covered in the documentation Powershell Configuration - File Backup or Rollback (the settings in the agent ini file will be used during the powershell.exe <FILE> command.


Usage

Use the following statements in the Process tab of a Windows job in order to use the Powershell interpreter (example):

:BEGIN_EXT_INTERPRETERS POWERSHELL
 Test-NetConnection -ComputerName "<Automation Engine Server>" -Port 2217 -InformationLevel "Detailed"
:END_EXT_INTERPRETERS POWERSHELL