{"record":{"id":"d4a688d0a16f5dc6","repo":"hashicorp/vagrant","slug":"an-error-occurred-executing-a-remote-winrm-command","errorCode":null,"errorMessage":"An error occurred executing a remote WinRM command.\n\nShell: %{shell}\nCommand: %{command}\nMessage: %{message}","messagePattern":"An error occurred executing a remote WinRM command\\.\n\nShell: %(.+?)\nCommand: %(.+?)\nMessage: %(.+?)","errorType":"exception","errorClass":"VagrantPlugins::CommunicatorWinRM::Errors::ExecutionError","httpStatus":null,"severity":"error","filePath":"plugins/communicators/winrm/shell.rb","lineNumber":176,"sourceCode":"          if output.stderr.include?(\"ParserError\")\n            @logger.warn(\"Detected ParserError, setting exit code to 1\")\n            output.exitcode = 1\n          end\n        end\n\n        return output\n      end\n\n      def raise_winrm_exception(exception, shell = nil, command = nil)\n        case exception\n        when WinRM::WinRMAuthorizationError\n          raise Errors::AuthenticationFailed,\n              user: @config.username,\n              password: @config.password,\n              endpoint: endpoint,\n              message: exception.message\n        when WinRM::WinRMHTTPTransportError\n          raise Errors::ExecutionError,\n            shell: shell,\n            command: command,\n            message: exception.message\n        when OpenSSL::SSL::SSLError\n          raise Errors::SSLError, message: exception.message\n        when HTTPClient::TimeoutError\n          raise Errors::ConnectionTimeout, message: exception.message\n        when IO::TimeoutError\n          raise Errors::ConnectionTimeout\n        when Errno::ETIMEDOUT\n          raise Errors::ConnectionTimeout\n          # This is raised if the connection timed out\n        when Errno::ECONNREFUSED\n          # This is raised if we failed to connect the max amount of times\n          raise Errors::ConnectionRefused\n        when Errno::ECONNRESET\n          # This is raised if we failed to connect the max number of times\n          # due to an ECONNRESET.","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/communicators/winrm/shell.rb#L158-L194","documentation":"Error \"An error occurred executing a remote WinRM command.\n\nShell: %{shell}\nCommand: %{command}\nMessage: %{message}\" thrown in hashicorp/vagrant.","triggerScenarios":"Thrown at plugins/communicators/winrm/shell.rb:176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}