Skip to content

Tag: powershell

Execute Powershell script from Node.js with ES6 Modules enabled

I need to execute a Powershell file on my NodeJS server and the answer to that is allready given in this post. However I am unable to replace const { exec } = require(‘child_process’); or var spawn = require(“child_process”).spawn; with the needed Import since my Server is running with ES6 Modules enabled in the package.json “type”: “module” Does anybody know