diff --git a/plugins/communicators/winrm/scripts/elevated_shell.ps1.erb b/plugins/communicators/winrm/scripts/elevated_shell.ps1.erb index 241993f03..454e5e874 100644 --- a/plugins/communicators/winrm/scripts/elevated_shell.ps1.erb +++ b/plugins/communicators/winrm/scripts/elevated_shell.ps1.erb @@ -1,4 +1,4 @@ -$command = "<%= options[:command] %>" +$command = "<%= options[:command] %>" + '; exit $LASTEXITCODE' $user = '<%= options[:username] %>' $password = '<%= options[:password] %>'