Issues with spaces in powershell file path

380 views
Skip to first unread message

TAYLOR J HAMMERLING

unread,
Jun 9, 2022, 1:30:50 PM6/9/22
to rundeck...@googlegroups.com

 We are using OpenSSH on our windows sharepoint server and the SSH node executor.  We are doing this instead of using WinRM due to the sharepoint cmdlets being inaccessible thru WinRM.

 

This works really well for us, with ONE exception (that I’ve found thus far).  If we try to execute a powershell script with a space in it’s name, we get an error back.  We have tried many different permutations of quoting the string.  Please see attached screenshots…

 

Any help you can provide would be greatly appreciated!

 

Graphical user interface, application

Description automatically generated

 

 

Graphical user interface, application

Description automatically generated

 

 

Graphical user interface, text, application

Description automatically generated

 

 

 

 

Taylor Hammerling

WEI/GLBRC IS Support & Operations Manager

✉  thammerling@wisc.edu

           +1-608-890-1780

           preferred pronouns: he/him/his

♬         https://open.spotify.com/user/snarfsmojo/playlists

 

rac...@rundeck.com

unread,
Jun 9, 2022, 2:47:48 PM6/9/22
to rundeck-discuss
Hi Taylor,

Could you test your command in a script step? Using powershell.exe as an interpreter.

Greetings!

TAYLOR J HAMMERLING

unread,
Jun 9, 2022, 3:05:09 PM6/9/22
to rundeck...@googlegroups.com

Unfortunately, I don’t think a script step is an option.  Using SSH as the node executor appears to make the assumption that the node is linux, as this is the error I receive when trying to run a powershell script

 

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/11ec1242-a2fc-4f67-a217-dd81ee0ff066n%40googlegroups.com.

rac...@rundeck.com

unread,
Jun 9, 2022, 3:13:29 PM6/9/22
to rundeck-discuss

I See, try using single quotes out of double quotes, e.g: '"C:/my path/file.txt"'

Regards!

TAYLOR J HAMMERLING

unread,
Jun 9, 2022, 4:04:46 PM6/9/22
to rundeck...@googlegroups.com
Unfortunately I tried that before sending initial email.  The third screenshot in my initial email shows the error that happens when I try single quotes around double quotes.

Do you have any resources regarding building our own node executor?

Sent from my mobile, 
please forgive any spelling, grammar or punctuation mistakes :)

Sent: Thursday, June 9, 2022 2:13:29 PM
To: rundeck-discuss <rundeck...@googlegroups.com>
Subject: Re: [rundeck] Re: Issues with spaces in powershell file path
 

rac...@rundeck.com

unread,
Jun 10, 2022, 8:59:37 AM6/10/22
to rundeck-discuss
Hey Taylor, take a look at this. Also, check this example.

Greetings.
Reply all
Reply to author
Forward
0 new messages