Run as script not working #4185
Labels
bug
Something isn't working
PowerShell Universal
Issue relates to PowerShell Universal.
requires triage
Issue has not yet been verified by the development team.
v5
Version 5 issue.
Description of Issue
Hello,
I am using version 5.1.0 of PowerShell Universal (PSU).
In Platform > Variables, I created two secret variables of type PSCredential: one for a domain user and another for a local user. Both accounts belong to the administrator group of the PowerShell Universal server. I can open a CMD window with both accounts and perform administrative actions. Both accounts also have the Administrator role in PSU, and the DisableRunAsSupport setting is unchecked.
I created a sample script:
"Hello" | Out-File C:\Logs\test.log
This script is part of the automation.
When I try to run this script with either account using the "Run As" parameter, I encounter the following error:
Error executing job: PowerShell did not respond in a timely fashion. PowerShell Universal is currently waiting 300 seconds for PowerShell to start running the script. You can increase the timeout by setting the 'Job Handshake Timeout' setting in the Settings > General > Automation page. If you are still experiencing issues, you may need to consider increasing the resources available on your system or take advantage of the Random Delay parameter for schedules to stagger jobs.
The PSU instance is otherwise empty, containing only this script. I increased the default timeout value from 30 to 300 seconds, but the issue persists. The server has ample resources (e.g., 16 GB of RAM).
When I leave the "Run As" parameter blank while running the script, it works successfully. The script also runs without issues when executed from a CMD command using either account.
I am currently unlicensed. Could this be a limitation of the unlicensed version, or is it a bug?
Best regards,
Version
5.1.0
Severity
High
Hosting Method
MSI (Windows Service)
Operating System
Windows
Database
SQLite
Licensed
No
Features
No response
Additional Environment data
No response
Screenshots/Animations
No response
The text was updated successfully, but these errors were encountered: