child-shell
child-shell copied to clipboard
PS_CMD_FAIL_ERROR: Error code = 0x80005000
when I invoke a command, the string was recognized correctly. then it throws an error which is "PS_CMD_FAIL_ERROR: Error code = 0x80005000" cloud you please to tell me how to solve it.
In my case i solved with this:
const Shell = require("node-powershell");
const { PSCommand } = require("node-powershell");
const ps = new Shell({
executionPolicy: 'Bypass',
noProfile: true
});
// Execute Script
let script = new PSCommand(`& "${require('path').resolve(__dirname, 'MYSCRIPT.ps1')}"`);
ps.addCommand(script);