PowerShell中的对象列表?

时间:2011-04-04 05:31:42

标签: powershell

如果我有三个相同类型的对象,如何将它们添加到列表中,以便我可以在之后执行 foreach ($entry in $list)

感谢。

1 个答案:

答案 0 :(得分:3)

你的意思是这样吗?

$a=1
$b=2
$c=3
$list = $a,$b,$c