I have an on-prem agent installed and am trying to execute a powershell ps1 script. I have tested it locally without Workato by using >PowerShell.exe -file "C:\Documents\test.ps1" and it works.
- 'C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -file C:\Documents\test.ps1'
But I am getting a weird error:
Cannot run program "C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -file C:\Documents\test.ps1": CreateProcess error=2, The system cannot find the file specified
I have tried double black slashes, forward slashes, back slashes....and all get errors. Anyone has used workato to execute a powershell script?
Hi ACL Services Team,
Apologies for the lates response on this topic.
You may check this link on how to create a command line script for your On-Prem agent: https://docs.workato.com/on-prem/profile.html#command-line-scripts-profile
Also, regarding this issue, may we know if you are using Workato as a normal user? If there are different admin rights, then the script might fail.
Send us a ticket, we will try our best to assist you with your problem