Running PowerShell Commands

Hello everyone,

First of all, I’ll exaplain detailed what I’m trying to do.

I’ve installed a program called “EMLtoPDFConverter”, this will get an EML file and then convert to PDF.

Running by PowerShell using ISE, runs perfectally the commands that I’ve inserted into EasyMorph, like you can see below in the picture.

If a run this EasyMorph project in desktop version, executes perfectaly with no errors.

But if I run this EasyMorph project from the EasyMorph server, I received this error:
Output,Errors
,"The term ‘java’ is not recognized as the name of a cmdlet, function, script file, or operable program. "

And I don’t know what I’m doing wrong.

Anyone can help me.

Regard’s
Hugo

Hi Hugo and welcome to the Community!

The PowerShell action expects a PowerShell script, not a list of shell commands.

See examples of use of the PowerShell action:

Ok, we’ve tried with this simple example and it is the same error:

@dgudkov

Another thing, I’ve understood what you i’ve said, but where is the difference between running EasyMorph Desktop and EasyMorph Server (testepowershell).

If you just need to run a Windows shell command or an external application use the “Run program” action. The “PowerShell” action in EasyMorph is for scripting in the PowerShell scripting language.

Not sure I understand your question. Can you please elaborate?

ok, like I said before I completly understand that the PowerShell action is only available for PowerShell Scripting language.
Sorry for about my insistence, but I still not understanding why, running my project with EasyMorph Desktop openned in the Windows, works fine with no problems.

And, if publish the project to the server and then execute the task I’ve created from Task scheduling, i received that error.

This is why I’ve made that question, in my idea using the Task scheduling or EasyMorph App is the same thing.

I’ll try to do use “Run program”.

Usually EasyMorph Server runs under a different Windows account than EasyMorph Desktop or Launcher. By default, the Server account is NT AUTHORITY/LocalService. That account may have different access permissions for files and folders than your Windows account. Make sure the PowerShell script or commands you are running can be successfully executed under Windows account that is used by EasyMorph Server (e.g. NT AUTHORITY/LocalService). For instance, try to execute the script/commands in another application that runs under the same Windows account as EasyMorph Server.

Hello @dgudkov,

Instead of using PowerShell, I’ve changed, like you said, using “Run Program” action.

I’ve tried, changing the user but with no results and with the same error, I quit to trying.

But at the end I have my problem solved with your help. :smile:

Regard’s
Hugo Jesus

Very good! :slight_smile: