ask for VM by name to reduce looping.
This commit is contained in:
parent
be0e9f7816
commit
ae184fe31d
|
@ -259,7 +259,7 @@ func DoesVirtualMachineExist(vmName string) (bool, error) {
|
||||||
|
|
||||||
var script = `
|
var script = `
|
||||||
param([string]$vmName)
|
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
|
var ps PowerShellCmd
|
||||||
|
|
Loading…
Reference in New Issue