Job step fails when try to execute inline powershell script

16 views
Skip to first unread message

roman fominichev

unread,
May 6, 2025, 6:50:01 AM5/6/25
to rundeck-discuss
Hi

If anyone can help me ?
Rundeck 5.x

Execution target is Windows 2019

Default Node Executor: WinRM Node Executor Python (python3)
Default File Copier: WinRM File Copier (python3)

When step is "Command", the powershell command executes OK
When step is "Script", then step fails with following error.
Doesn't matter  - what is inside the step: the same "pwd" will be executed OK as a "Command", but will fail when step is "Script"


Traceback (most recent call last):
  File "/var/lib/rundeck/libext/cache/py-winrm-plugin-2.1.3/winrm-filecopier.py", line 435, in <module>
    copy.winrm_upload(remote_path=destination,
  File "/var/lib/rundeck/libext/cache/py-winrm-plugin-2.1.3/winrm-filecopier.py", line 195, in winrm_upload
    self.session.run_ps('if (!(Test-Path {0})) {{ New-Item -ItemType directory -Path {0} }}'.format(remote_path),
  File "/var/lib/rundeck/libext/cache/py-winrm-plugin-2.1.3/winrm_session.py", line 107, in run_ps
    rs = self.run_cmd('powershell -encodedcommand {0}'.format(encoded_ps),
  File "/var/lib/rundeck/libext/cache/py-winrm-plugin-2.1.3/winrm_session.py", line 88, in run_cmd
    raise Exception("Connection failed after {0} retries".format(retry))

Thank you

roman fominichev

unread,
May 6, 2025, 7:46:30 AM5/6/25
to rundeck-discuss
Hi

you can ignore this question.
Kerberos auth was configured and used.
In the project settings - for file copier - it was a small typo in the "Certificate Path". But it was correct for the default node executor.

Thank you

вторник, 6 мая 2025 г. в 12:50:01 UTC+2, roman fominichev:
Reply all
Reply to author
Forward
0 new messages