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 …”
In general, do community nodes now work on desktop versions ?
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.
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.
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 ?
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