KBI 311885 Running PowerShell Scripts Directly From Argent Job Scheduler


Argent Scheduling Engine 10.0-2010-A


Friday, 13 November 2020


How to set up Argent Job Scheduler to run PowerShell scripts

Technical Background

Windows PowerShell scripts by default are disabled and must be enabled to execute directly

Argent Job Scheduler can run Windows PowerShell scripts


Update Argent Queue Engine servers to allow execution of Windows PowerShell script

This must be done on each Argent Queue Engine server

See Microsoft documentation for more assistance


Option One

Create new Job Template

Under Job Basic (JW20A)

Job File should be set to


Parameters should be set to

-NonInteractive -NoLogo -ExecutionPolicy bypass -Command “& { $ErrorActionPreference = ‘continue’; & ‘c:\scripts\NameOfscript.ps1’ @args; EXIT $LASTEXITCODE }”

Option Two

Create File Association with “.ps1” to open file with PowerShell

Create new Job Template

Under> Job Basic (JW20A)

Job File should be set to location of PowerShell script

Warning: Exit code from PowerShell script will not be passed to Argent Job Scheduler

Argent Job Scheduler will consider all PowerShell script failures having an exit code of 1