Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run as script not working #4185

Open
Twenty94470 opened this issue Jan 1, 2025 · 0 comments
Open

Run as script not working #4185

Twenty94470 opened this issue Jan 1, 2025 · 0 comments
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.

Comments

@Twenty94470
Copy link

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

@Twenty94470 Twenty94470 added 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. labels Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

1 participant