You can create a small array before the foreach loop gived by @lucd and add the value from $vm to the array.
$vmarray = @()
foreach (...)
{
$vmarray += $vm
}
$vmarray
You can create a small array before the foreach loop gived by @lucd and add the value from $vm to the array.
$vmarray = @()
foreach (...)
{
$vmarray += $vm
}
$vmarray