PowerShell script fails '"' is not recognized as an internal or external command
search cancel

PowerShell script fails '"' is not recognized as an internal or external command

book

Article ID: 253206

calendar_today

Updated On:

Products

CA Process Automation Base

Issue/Introduction

PowerShell script is failing with below error where as it works fine when executed directly in the server:
'"' is not recognized as an internal or external command, operable program or batch file.

Environment

Release : 4.3

Cause

Password value gets appended with extra space automatically.

Resolution

Trim the extra space in the password variable as below:
Process.cyberarkPassword=Process.Run_Script_2.scriptOutput.trim();