Windows Agent installed in 'C:\PROGRAM FILES' -- Best Practice when jobs using external interpreter are executed.
search cancel

Windows Agent installed in 'C:\PROGRAM FILES' -- Best Practice when jobs using external interpreter are executed.

book

Article ID: 277938

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

If an Windows agent, installed in "C:\PROGRAM FILES" tries to execute a powershell script section set between  UC_EXT_INTERPRETERS_WINDOWS tags, the job will abort. The Report will indicate that the powershell could not be created because it could not be created

 

===============================================

c:\>PowerShell -NonInteractive -ExecutionPolicy bypass -NoLogo -File C:\Program Files\WIN2105_A\Resources\0022\0002139002\0002139002_0001.ps1 Processing -File 'C:\Program' failed because the file does not have a '.ps1' extension. Specify a valid Windows PowerShell script file name, and then try again.Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

===============================================

Environment

Windows systems, all Windows agent are affected.

Cause

This error comes from the fact that the agent is not able to parse the path because of space character " " in the path name.

 

 

Resolution

To workaround this problem in the VARA determining the powershell command to use the path parameter determining the path must  be protected by setting it between double quotes.

Additional Information

To read more about the use of these VARAs:

https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/21.0.9/Automic%20Automation%20Guides/Content/AWA/Variables/UC_EXT_INTERPRETERS.htm?Highlight=UC_EXT