Commit Graph

9 Commits

Author SHA1 Message Date
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 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
Taliesin Sisson 5d5809b27e Make hiding of progress backward compatible with old versions of powershell 2016-12-12 22:44:48 +00:00
Taliesin Sisson e8c2b49be8 Use correct quotation of variables 2016-12-12 22:44:34 +00:00
Taliesin Sisson 4b394c8563 Write output will put ouput from function, so we don't want to be getting line from output of function
Fix unit tests for not showing progress stream when using powershell
Ensure that progress stream does not get leaked into stdout
Using Write-Output instead of Write-Host since PS v5 now leaks the host stream to stderr
2016-12-12 22:44:33 +00:00
Taliesin Sisson c42cb88ddd Using Write-Output instead of Write-Host since PS v5 now leaks the host stream to stderr 2016-12-12 22:44:32 +00:00
Mitchell Hashimoto 040ff0706d provisioner/powershell 2015-06-14 11:01:28 -07:00