VMware Cloud Community
EPAZIL
Contributor
Contributor

invoke-vmscript exitcode -3

Hi

I am running a powershell script that invoke running of exe inside a VM. It work very strange. In some cases it work fine with exitcode 0 and in some cases I get exitcode -3.

The exitcode -3 can happen to the same VM it work fine just few hours before. Restarting the target VM doesn't solve this.

I didn't find any documentation about invoke-VMscript exit codes and what they mean.

Will appreciate any help

Thanks

Epaz

0 Kudos
2 Replies
LucD
Leadership
Leadership

The ExitCode that is returned by Invoke-VMScript, is the exit code of the command you ran inside the guest OS.

As an example

Invoke-VMScript -ScriptText 'exit 7' -ScriptType Powershell -VM (Get-VM -Name MyVM) |

Select *

will show the ExitCode with the value 7.

So I strongly suspect that the EXE you are running inside the Guest OS might be responsible for the Exit Code -3 you are seeing.

Which EXE is that?

Does it have documented exit codes?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
EPAZIL
Contributor
Contributor

Got it.

It is my own exe.

Will resurch it in my software.

Thanks

0 Kudos