DanHam
fa5fd602aa
Fix tests post changes
2017-09-26 11:07:26 +01:00
DanHam
8214a12a2a
Move append of portion of command used to send elevated PS output to file
2017-09-26 11:07:26 +01:00
DanHam
2a060adbf8
Don't use -EncodedCommand with PS as progress stream always leaks to stderr
...
* Setting $ProgressPreference to SilentlyContinue makes no difference
when -EncodedCommand is used - any output to the progress stream
still appears on stderr.
* Delete file containing encode/decode functions since we no longer
need them.
* Fixes leak of output on progress streams for both normal and elevated
commands.
* Since we no longer base64 encode, ensure any characters special to XML
are correctly escaped in the elevated command. This ensures correct
parsing once the command is wrapped within the elevatedTemplates XML
based Task Scheduler definition.
Fixes #4322
2017-09-26 11:07:11 +01:00
DanHam
5374c6e367
Use system context env var to set path for elevated PS env vars file
2017-09-21 12:08:29 +01:00
Matthew Hooker
af1187d5e1
simplify a bit
2017-09-15 10:06:54 -07:00
Megan Marsh
b05c673a14
Update powershell provisioner test with new default
2017-09-15 08:17:17 -07:00
Megan Marsh
cbe1d7d854
simplify file upload for elevated powershell wrapper
2017-09-14 17:01:48 -07:00
Megan Marsh
92e70757bb
Move env vars into a file that we dot-source instead of trying to write them all to the command line
2017-09-14 17:00:57 -07:00
Megan Marsh
d458628529
exclude elevated_executed_command from config interpolation so it can be used correctly later
2017-09-14 10:50:32 -07:00
Megan Marsh
c6889ad009
clarify logging by changing 'shell' to 'powershell' inside of the powershell provisioner
2017-09-06 11:59:25 -07:00
Megan Marsh
b2923b4da6
check stdout to make sure echo command actually goes through before counting computer as fully restarted
2017-08-24 12:10:27 -07:00
Megan Marsh
89b058604d
update tests for pull 5272
2017-08-22 14:20:40 -07:00
Megan Marsh
5214851463
make every script name unique
2017-08-22 14:03:28 -07:00
Luke Farnell
d9a5b69403
clean up ineffectual assignments
2017-08-07 13:20:01 -04:00
Matthew Hooker
81522dced0
move packer to hashicorp
2017-04-04 13:39:01 -07:00
Matthew Hooker
0149f679de
Print instead of Printf with no dynamic first variable.
2017-03-28 20:36:20 -07:00
DanHam
370b67497e
provisioner/powershell: Don't over complicate removal of tmp output file
2017-01-26 11:21:45 +00:00
DanHam
21be983855
provisioner/powershell: Use system context env var to set output file path
...
Fixes #4271
2017-01-26 00:17:46 +00:00
DanHam
c88fafdf38
provisioner/powershell: align, fix and compact env var test
2017-01-23 12:10:46 +00:00
DanHam
4122f3a897
provisioner/powershell: Remove env var check - we already check in Prepare
2017-01-23 12:10:46 +00:00
DanHam
80ebcea5e1
Mirror cleaner test code back from windows-shell to powershell
2017-01-19 13:33:59 +00:00
Matthew Hooker
480398c3d2
only set PACKER_HTTP_ADDR if a server is listening
2017-01-17 17:17:36 -08:00
Matthew Hooker
6563eb213c
Document. add to windows-shell and powershell
2017-01-17 17:07:36 -08:00
DanHam
0423f91037
Fix to allow equals sign in value of environment variable
2016-12-28 00:33:16 +00:00
DanHam
be0196492f
Tests for env variables values starting with or containing an equals sign
2016-12-28 00:31:17 +00:00
Taliesin Sisson
f38d787b0e
Powershell uses UTF16Le for encodedCommand
2016-12-12 22:44:56 +00:00
Taliesin Sisson
e36051d394
Pattern for infrastructure changed to quote filename and execute file with ampersand as everything is run in powershell now
...
Handle powershell commands by specifying any extra infrastructure around running scripts inside of ExecuteCommand and ElevatedExecuteCommand
2016-12-12 22:44:55 +00:00
Taliesin Sisson
d61513bf77
Encode powershell using utf8
...
Fix a bug in the size of string that was returned when decoding a base64 string
Added tests around encoding and decoding powershell scripts. Used [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes('powershell commands')) | clip to generate what base 64 strings should look like
2016-12-12 22:44:54 +00:00
Taliesin Sisson
17597b48e1
Base64 encode powershell to avoid any necessary escaping
2016-12-12 22:44:54 +00:00
Taliesin Sisson
5d5809b27e
Make hiding of progress backward compatible with old versions of powershell
2016-12-12 22:44:48 +00:00