while triggering a Puppet agent run on a remote AWS EC2 instance, I always got a return code of 1 back from powrshell_elevated, where the real return code was 2.
The command executed remotely was puppet agent --test. I needed to change that to puppet agent --test; exit $LastExitCode to get the correct return code.
Please ensure that powershell_elevated always returns the real return code of the executed command.
Hi,
while triggering a Puppet agent run on a remote AWS EC2 instance, I always got a return code of 1 back from powrshell_elevated, where the real return code was 2.
The command executed remotely was
puppet agent --test
. I needed to change that topuppet agent --test; exit $LastExitCode
to get the correct return code.Please ensure that powershell_elevated always returns the real return code of the executed command.