Is there any way to trigger a shell script from the Outsystems UI?

Hi all, 


With the click of a button, I want to start a shell script which is in a remote server. I checked the forum and could find the component i.e. 'PowerShell'.


Is it possible to achieve with Powershell or any other way to accomplish the same?


Thanks in advance!

Hans Dollen wrote:

Hi Aditya


you might take a look at https://www.outsystems.com/forge/component-overview/1783/powershell-commander.

Regards,


Hans

Hi Hans,


Thank you so much for the response. If I use this component then Powershell has to be installed on my remote linux machine. Can you please clarify?


Hi Aditya,

Powershell is Windows-only, it doesn't run on Linux. You say you want to trigger a shell script on another server - that sounds like a remote procedure call or the like. Whether that's at all possible depends largely on what the remote machine allows you to do, and how it expects you to do it. It has little to do with OutSystems at this stage. You should consult whomever understands these kinds of things, and when you know the technical details, then you can ask how to do that with OutSystems.

Note, however, that being able to remotely start software on another machine may pose a very big security risk, so you might not want to go there at all!

Aditya Chopra wrote:

Hans Dollen wrote:

Hi Aditya


you might take a look at https://www.outsystems.com/forge/component-overview/1783/powershell-commander.

Regards,


Hans

Hi Hans,


Thank you so much for the response. If I use this component then Powershell has to be installed on my remote linux machine. Can you please clarify?


Hi,


As long as Powershell is installed in your OutSystems front-ends you should be able to remotely execute the bash script. Microsoft added SSH support to Powershell. Check the following article:

https://www.thomasmaurer.ch/2016/04/using-ssh-with-powershell/ 


For that you can use the component already mentioned by Hans.


Ivo