Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JEC failing to run .ps1 script due to permission issue

Osama Aljassar January 24, 2025

I have a windows server 2019 standered edition.

I have a service that is running on windows IIS.

I have installed JEC on this service and set up an automation for whenever i get an alert is created that this service running on IIS stopps working, JEC should run a restart_iis.ps1 script that is on the server to restart iis.

But this automation fails due to the following error when JEC trys to run the script

Restart attempt failed. 
Access denied, you must be an administrator of the remote computer to use this
command. Either have your account added to the administrator local group of
the remote computer or to the domain administrator global group.

restart_iis.ps1 contecnt:

invoke-command -scriptblock {iisreset}

I have tried creating a new local user 'JEC' and added it to Administrators group and change the service's log on setting to use this user. Still the same error, same with when i set the Log On as Local System account.

Last note, the weirdest thing that I noticed is that i created another jira automation that is exaclty copy on this one that alsu uses the same JEC keys but instead the trigger being on alert created, it's triggered manualy from an action button in the alert. and the manual trigger runs the script normaly without any issue

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events