Product: PowerShell Universal
Version: 5.6.8
When i try to run a script in any other Environment then the integrated environment, the Scripts arent Running its always the error:"
“Error executing job: PowerShell did not respond in a timely fashion. PowerShell Universal is currently waiting 60 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.”
It doenst matter if i create a new custom environment or the build-in ones.
In task manager i see the Task starting with the PID listet in the job, but the process isnt doing anything.
Its a nearly fresh install of 5.6.8 on Server 2022
- What security mode are you in? Integrated, Permissive or Strict
- Is your server sat behind some sort of proxy?
- Do you have any bypasses in place? (e.g env vars set for http_proxy, https_proxy and no_proxy)
I basically had this issue or something like it, couldnt use anything but integrated. At some point it went away and I can now use other enviornments, though I’m not sure the cause. I do have bypasses on local addresses which was also causing issues at with grpc/local calls getting blocked at some point.
I was in Strict, but tested all the others and the issue persists.
The Server itself needs a proxy to communicate to the internet but this should not interfere with running simple
Write-Output "test"
I do hace a bypasses in place which work great with the installed PS7 in my user context and the Context of the MSA which is running the PSU Service. The MSA itself is local admin on the server and can run batch jobs(tested in Task SCheduler"). It also has all needed Permissions set as required in the docs via GPO.
The Process is getting startet, e.g pwsh, and then it idles at 0% CPU and 20-30mb RAM until it timesout in PSU and the process is killed. Same for the built-in PS7 and ps5 environment
“The Server itself needs a proxy to communicate to the internet but this should not interfere with running simple” - thats what I thought but I was getting issues with my squid proxy blocking local gprc connections. It was not until I added a proxy bypass for localhost (via no_proxy env var), 127.0.0.1 & servername.domain, that it stopped causing issues. So in some scenarios, proxy bypasses are indeed required for seemingly local connections. And this was for all non integrated environments.
Thank you very much, that worked.
I hate proxies 
1 Like