You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying the following code to run some powershell. It looks to me though that for some reason, when ps.invoke() is called, $error shows that there is a problem. Any ideas why?
Hi,
I'm trying the following code to run some powershell. It looks to me though that for some reason, when ps.invoke() is called, $error shows that there is a problem. Any ideas why?
const ps = new shell ({ executionPolicy: 'Bypass', noProfile: true, verbose: true})
ps.addCommand( "write-host $error.count")
ps.invoke().then(output => { console.log("test script finished")})
if i inspect the output, $error.count = 1, even though it hasn't done anything.
thanks for your help
The text was updated successfully, but these errors were encountered: