It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Run Powershell Script on workflow

Jeremie Mallie I'm New Here Apr 30, 2019

Dear, 

I'm trying to execute a Powershell script as post function on Jira workflow with SSH connection. The final idea is to send a calendar invitation to a specific calendar when we have planned an intervention. 

1. Jira is installed on linux 

2. I'm able to run the Powershell command  through ssh command on the linux server to the windows. 

3. Script Runner installed

4. I tried : "ssh user@server.domain.local 'cmd.exe /c Powershell.exe c:\temp\test.ps1'".execute().text 
Result : null 

5. I create a bash script on the local server. I'm able to execute it from the server, Powershell command work. From jira with script runner, it's not working. The line with ssh command is not working. No error message, just like no running. 

local script (/var/scripts/) 

ssh -i /tmp/id_rsa user@server "cmd.exe /c mkdir c:\temp\test123"

 

In Script runner console:


"sh /var/scripts/test.sh".execute().text

 

Thank you for your help

0 answers

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Join our webinar: “Asset Management: The Role of Context in ITSM” with Atlassian & Riada

  Hi Atlassian Community! This is Teresa from the Jira Service Desk team. On June 19th, I’ll be hosting a webinar “Asset Management: The Role of Context in ITSM” with Atlassian Partne...

115 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you