From aa33740ffb3de3e930c6ebd43391dcf1713d3dda Mon Sep 17 00:00:00 2001 From: Petrik van der Velde Date: Mon, 20 Mar 2017 22:01:34 +1300 Subject: [PATCH] Removing the check for administrator rights from the script that sends keystrokes to Hyper-V. Because Packer has already verified that we are running with at least Hyper-V administrator rights this should be safe. Having the requirement for administrator rights in the script means that you still need to be an administrator if you want to use packer to build Hyper-V images with a configuration that requires you to send keystrokes to the MV, say when building a Linux box. --- common/powershell/hyperv/hyperv.go | 1 - 1 file changed, 1 deletion(-) diff --git a/common/powershell/hyperv/hyperv.go b/common/powershell/hyperv/hyperv.go index 125e56099..6e2b9dc7e 100644 --- a/common/powershell/hyperv/hyperv.go +++ b/common/powershell/hyperv/hyperv.go @@ -806,7 +806,6 @@ func TypeScanCodes(vmName string, scanCodes string) error { var script = ` param([string]$vmName, [string]$scanCodes) #Requires -Version 3 - #Requires -RunAsAdministrator function Get-VMConsole {