Merge pull request #8357 from hashicorp/fix_8330
ask for VM by name to reduce looping.
This commit is contained in:
commit
c09bb52a92
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue