Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS_CMD_FAIL_ERROR: Error code = 0x80005000 #138

Open
Genp0 opened this issue Aug 22, 2021 · 1 comment
Open

PS_CMD_FAIL_ERROR: Error code = 0x80005000 #138

Genp0 opened this issue Aug 22, 2021 · 1 comment

Comments

@Genp0
Copy link

Genp0 commented Aug 22, 2021

image

image

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.

@brunomartinspro
Copy link

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants