WinRb / winrm-elevated

Runs PowerShell commands as elevated over Windows Remote Management (WinRM) via a scheduled task
Apache License 2.0
27 stars 17 forks source link

powershell_elevated returns wrong exit code #8

Closed dhs-rec closed 7 years ago

dhs-rec commented 8 years ago

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 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.

mwrock commented 7 years ago

Should be fixed by 3a9e9aa0727bc2e1e232bfb274f1d827d9d641f4 but please reopen if you still see this.