Open gangadhar01a opened 5 years ago
Same issue here with robocopy command in Powershell script : if unc path have space : Rundeck is out of order !
[WinRMPython] execCommand started, command: PowerShell.exe -executionpolicy bypass C:\WINDOWS\TEMP\0-1596-srv1.domain.com-robocopy-rundeck.ps1.PS1 ''"'"'\\srv1.domain.com\Modèles de documents'"'"'' ''"'"'\\nas2.domain.com\Share\Modèles de documents**'"'"''
Then we got this :
[DEBUG ] SPNEGO step output: (_negotiate.py:135)[spnego._negotiate] [DEBUG ] Sending encrypted credentials (credssp.py:165)[requests_credssp.credssp] [WinRMPython]: result code: 1, success: false [WinRMPython] execCommand started, command: del C:\WINDOWS\TEMP\0-1596-srv1.domain.com-robocopy-rundeck.ps1.PS1 [WinRMPython] executing: [[${config.interpreter}, -u, /var/lib/rundeck/libext/cache/py-winrm-plugin-2.0.14/winrm-exec.py, ${node.hostname}]]
execution overview : $ PowerShell.exe -executionpolicy bypass scriptfile.PS1 "'\srv1.domain.com\Modèles de documents'" "'\nas1.domain.com\AMC-Birieux\Modèles de documents'"
Note : quote and double quote , when copy/paste this exact command under target node : it's working perfectly !
oups ... there also ... an encoding issue when using "é" accented chararcter . Rundeck + powershell = the Hell !
Hi,
I am executing the following powershellscript via rundeck to stop the service
"$serviceName=$args[0] $id=Get-WmiObject -Class Win32_Service -Filter "Name LIKE '$serviceName'" $id.ProcessId taskkill /pid $id.ProcessId /F"
Created a field called "serviceName" in rundeck job.
The entire job works as expected for all services expect the service which has spaces example: if the serviceName is "Advantage Platform License Service"
This resulted in following error in "LogOutput"
~~~~~~~~~~~~~Not sure why rundeck added a single quote at the beginning of Advantage .
Things which I have tried, I have changed the input to "Advantage%[ ]%Platform%[ ]%License%[ ]%Service"
This time the following error showed up
~~~~~~~~~~~~~Again I have noticed the single quote at the beginning of "Advantage%[" - This may be he reason why rundeck unable to execute the script.
I have manually executed the script with input "Advantage%[ ]%Platform%[ ]%License%[ ]%Service" on the server, which has worked without any issues.