==> virtualbox-iso: Connected to WinRM!
==> virtualbox-iso: Uploading VirtualBox version info (5.1.18)
==> virtualbox-iso: Provisioning with Powershell...
==> virtualbox-iso: Provisioning with shell script: C:\Users\vagrant\AppData\Local\Temp\packer-powershell-provisioner029272611
virtualbox-iso: Exception calling "Run" with "1" argument(s): "Could not load file or assembly
virtualbox-iso: 'Microsoft.PowerShell.Commands.Management' or one of its dependencies. The
virtualbox-iso: system cannot find the file specified."
virtualbox-iso: At C:\Users\vagrant\AppData\Local\Temp\packer-elevated-shell-58d88da0-926d-aa38
virtualbox-iso: -4744-6d53beaecfa5.ps1:51 char:1
virtualbox-iso: + $t.Run($null) | Out-Null
virtualbox-iso: + ~~~~~~~~~~~~~~~~~~~~~~~~
virtualbox-iso: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
virtualbox-iso: + FullyQualifiedErrorId : ComMethodTargetInvocation
virtualbox-iso:
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Script exited with non-zero exit status: 1. Allowed exit codes are: [0 3010]
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/QKlsgxYqUSY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0eyhDweamTVifjA11Nn3iwX-qzUXsPxEsv%3D%2BB0DMkG4aww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/9ebfe018-63ea-476a-968e-763b614b0020%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
> I don't understand why Packer is trying to use the Task Scheduler to run PowerShell scripts in the first place. Why doesn't it just upload the script and execute?To my understanding that is how you must do it to elevate privileges and run a script. If you have another way of doing it please enlightening us.On Jun 14, 2017 18:59, "Joshua H." <jth0...@gmail.com> wrote:I too am getting the exact same error with Server 2012. I'm not sure exactly what the issue is, or how to work around it. This is with Packer 1.0.0.
I don't understand why Packer is trying to use the Task Scheduler to run PowerShell scripts in the first place. Why doesn't it just upload the script and execute?
The OP said not elevating the script seems to work, so I will give that a shot, but that shouldn't matter.--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/9ebfe018-63ea-476a-968e-763b614b0020%40googlegroups.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/QKlsgxYqUSY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt-k%3DkBb6hwmTtgPQdfQ5k3Ln4zb6bXSL_vSNEDE4uAtTg%40mail.gmail.com.