diff --git a/powershell/hyperv/hyperv.go b/powershell/hyperv/hyperv.go index e34907521..8c330f426 100644 --- a/powershell/hyperv/hyperv.go +++ b/powershell/hyperv/hyperv.go @@ -91,7 +91,7 @@ $lastControllerNumber script = ` param([string]$vmName, [string]$isoPath, [int]$controllerNumber) $dvdController = Add-VMDvdDrive -VMName $vmName -ControllerNumber $controllerNumber -path $isoPath -Passthru -Set-VMDvdDrive -path $null +$dvdController | Set-VMDvdDrive -path $null $dvdController.ControllerLocation `