Powershell on local install

Newbie trying to get a working Powershell script from my desktop shortcut into n8n, from a manual trigger. Although script completes and produces a log file proving it for both shortcut and n8n version, the n8n version never exits the executing phase. I use the n8n “Execute Command” and then give it exactly the same parameters as the shortcut. Got bored with all teh variations chatgpt has proposed… eg. “powershell.exe -ExecutionPolicy Bypass -NoProfile -Command …”

Found this: GitHub - StarfallProjects/n8n-nodes-powershell: This is a custom node for n8n. It allows you to execute PowerShell commands within an n8n workflow., which may work. It says a) I need to install this as a community node, but b) community nodes do not work in desktop version.

As this comment is 2 years old…

  1. In general, do community nodes now work on desktop versions ?
  2. For this specific problem, any idea how I might execute a Powershell script from n8n ? Seems like a common enough activity people will want to do, or am I missing something ? It initiates, executes ok, just neevr finishes. I have put “EXIT” commands in poswerscript.

Information on your n8n setup

  • n8n version: 1.77.3
  • Database:Postgresql 17.2
  • Running n8n via desktop app:
  • **Operating system: Windows 10 **

All ideas welcome.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I haven’t tried to run n8n locally as a desktop version, Just curious has the local file trigger worked for you if you were to update a file in your C:User\Downloads file path?

I know most people usually run n8n on docker, and recently I found out from another thread there is a way to share a directory between the Host computer and the docker container. So theoretically you can share the powershell script by placing it in a file directory and the n8n running on docker should be able to load it into its own file directory.

Other Thread

Thanks Ryan. Was trying to keep it very simple and not access the file at all.

Basically thought (I am a beginner), that if my Powershell responded with a line of text (“Success” or “Failed”), along with a matching EXIT code for good measure, that the N8N would receive that info and I could use it in my next step to check the success criteria.

My Powershell writes info to both console and log. So I can prove by looking at the log, that I have indeed completed the script with success and reached the EXIT line. So Powershell is not looping, it is EXITing and writes “Success” to the console (as well as log file).

As I write this, I realise I should write a basic Powershell that just does that and see what happens.

Does anyone know… 1. In general, do community nodes now work on desktop versions ?

Hi there, did u get this working, i was tryin to run one command however its also spinning i tried execute command aswell as the powershell node

seems that the n8n node doesnt like command with --something in the line , for an example quickrun --space test --name “test.json” any ideas? i tried code execute, i tried code function i tried command line , non works

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.