Windows jobs or Powershell scripts get Exit code 5, Status: "Access is denied."
search cancel

Windows jobs or Powershell scripts get Exit code 5, Status: "Access is denied."

book

Article ID: 39442

calendar_today

Updated On:

Products

Autosys Workload Automation CA Workload Automation AE - Business Agents (AutoSys) Workload Automation Agent CA Workload Automation DE

Issue/Introduction

In some Windows servers programs which will run successfully manually.  They will fail when submitted via Manager (Autosys/DE) and WA Agent.

Environment

Release:
Component: SYSAGT

Cause

The job likely requires console access for a popup window.

Resolution

Add following parameters in the “agentparm.txt” file of the Agent and restart the service : 

oscomponent.interactive=true 
oscomponent.su.newconsole=true 

On the job, set the interactive switch or attribute to true.

For AutoSys:

interactive: y

 

Note: As of Windows 2016 and above, the user defined in job must be logged on via RDP session.  The WA Agent has to be able to find an active user session for it to able to attach the job for any console interaction.