Run Powershell Script on workflow

Jeremie Mallie April 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
TAGS
AUG Leaders

Atlassian Community Events