Merge pull request #8357 from hashicorp/fix_8330

ask for VM by name to reduce looping.
This commit is contained in:
Megan Marsh 2019-11-13 14:06:57 -08:00 committed by GitHub
commit c09bb52a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ func DoesVirtualMachineExist(vmName string) (bool, error) {
var script = `
param([string]$vmName)
return (Hyper-V\Get-VM | ?{$_.Name -eq $vmName}) -ne $null
return (Hyper-V\Get-VM -Name $vmName | ?{$_.Name -eq $vmName}) -ne $null
`
var ps PowerShellCmd