Commit Graph

20 Commits

Author SHA1 Message Date
William E. Triest. III 4a2566c646 Fixes 4309
When the winrm communicator executes a command in an elevated shell,
this patch causes it to escape double quotes.

This is necessary as the first line in the file that it produces and
then executes it puts the command into a variable called command that
is delimited by double quotes.
2014-08-07 08:49:36 -04:00
Shawn Neal c72a412600 Better WinRM command failure messaging
Command failures include the stdout and stderr in the error message just like the SSH communicator.
Its now possible to specify only an error_class and have that use the correct error_key by default.
2014-06-24 10:09:11 -07:00
Kalman Hazins bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto d7fa60b5df communicators/winrm: use winrm_info cap if available [GH-3832] 2014-05-20 20:13:36 -07:00
Mitchell Hashimoto 0485413d0a Merge pull request #3847 from mitchellh/command-line-too-long-fix-for-winrm
guests/windows: fix #3816 long arg list
2014-05-20 19:38:53 -07:00
Mitchell Hashimoto 690c119ae2 communicators/winrm: don't look up forwarded port if non-local [GH-3861] 2014-05-20 19:30:53 -07:00
Shawn Neal 0d3979f80d Fixed issue 3816
Elevated command line is now rendered to a script which is uploaded to the guest and executed. This allows the command line itself to be less than 100 chars to start the script and any user commands are puts into the script which has unlimited* length.
2014-05-19 08:04:59 -07:00
Mitchell Hashimoto b47df84887 communicators/winrm: fix tests 2014-05-07 10:09:14 -07:00
Mitchell Hashimoto 882c9ad7f6 communicators/winrm: good_exit option 2014-05-07 09:47:47 -07:00
Shawn Neal 30b0399431 Use new Ruby hash initializer syntax 2014-04-26 21:07:26 -07:00
Shawn Neal f18a397289 Allow WinRM commands to be run elevated via scheduled task 2014-04-26 21:07:26 -07:00
Shawn Neal afeb60c850 ivars should be alphabetized 2014-04-24 07:50:24 -07:00
Shawn Neal ab51a786ff Extract execution_output method from WinRM comm execute 2014-04-23 21:49:28 -07:00
Shawn Neal f44c795eed Integrated WinRM command filter into communicator
*nix commands are now filtered out instead of being sent to the guest. This means the command_alias PowerShell script is no longer needed.

Moved the PowerShell exit code helper to the WinRM shell and changed it to always return an exit code.
2014-04-23 20:38:16 -07:00
Shawn Neal 9177bd8a48 Added WQL support to Vagrant communicator execute
- Removed duplication for WQL specific commands
2014-04-22 11:29:22 -07:00
Mitchell Hashimoto db64fbf6ef communicators/winrm: reload shell on reload so we get proper port 2014-04-21 13:56:42 -07:00
Mitchell Hashimoto 7223e29330 communicators/winrm: fix powershell execution 2014-04-21 13:51:05 -07:00
Mitchell Hashimoto 21ac0810fd communicators/winrm: more tests 2014-04-21 13:51:04 -07:00
Mitchell Hashimoto bb9f0aef32 communicators/winrm: autodetect port based on forwarded ports 2014-04-21 13:51:03 -07:00
Mitchell Hashimoto 2a8a04ebb9 communicators/winrm: initial import from vagrant-windows 2014-04-21 13:50:58 -07:00