Error trying to execute a inline script on remote powershell

307 views
Skip to first unread message

acruz

unread,
Sep 6, 2017, 8:12:21 PM9/6/17
to rundeck-discuss

Hi everyone and thanks in advance,

First of all sorry for my bad english. I have a problem executing a inline script to remote windows node using rundeck. My Rundeck is running on Centos7, and the rundeck version is Rundeck 2.9.3-1 


My objective: Write my script on rundeck and execute it on remote powershell.


Actual state:

I configured the winrm plugin, the node…  and it works if I use the remote command options in job configuration. For example a simple ipconfig. Also works execute a local script on the node, for example using: powershell.exe $PATH/script.ps1. It could be a solution, but I need modify the script without connect to Windows node. This scripts are in constant update. For that reason I only have the inline script option.


This works:




I configured the OpenSSH server on the Windows node for run the SCP. If I connect to rundeck via ssh, and type ssh Administrator@ipwindows I can loggind without password.

Well, when I try to launch job with this step:
-Step type: Script – Inline script
-Script to execute: ipconfig (for example)
-Invocatión script: powershell.exe
-File extensión:  .ps1
-Execution preview: $ powershell.exe "scriptfile.ps1 "



This not works: 





When I run the job I have the next error:

Authentication failure connecting to node: "Windoes Node". Password incorrect.

Failed dispatching to node “Windows Node”: [jsch-scp] Failed copying the file: Authentication failure connecting to node: "Windows Node". Password incorrect.



Any ideas? I can’t find the problem…


Thank you.

Reply all
Reply to author
Forward
0 new messages