Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 5ab6161

Browse files
author
Konstantina Chremmou
committed
Merge pull request #2 from ChrisH4rding/master
Force the filter to return an array at all times to ensure the look-up using index works properly
2 parents 649eea7 + c88c2a2 commit 5ab6161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

powershell/samples/AutomatedTestCore.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function install_vm([String]$name, [String]$sr_name)
248248

249249
#find a windows template
250250
log_info "looking for a Windows template..."
251-
$template = (Get-XenVM -Name 'Windows XP*' | where {$_.is_a_template})[0]
251+
$template = @(Get-XenVM -Name 'Windows XP*' | where {$_.is_a_template})[0]
252252

253253
log_info ("installing vm '{0}' from template '{1}'" -f $template.name_label,$name)
254254

0 commit comments

Comments
 (0)