我有两个文本文件,比方说含有: 的1.txt: 1
2
3
4
5
6
2.txt: a
b
c
d
e
f
我尝试读取文件,然后将结果输出到Out-Gridview(每个文件位于其自己的列中): 1 a
2 b
3 c
4 d
5 e
6 f
我想: $list1= gc 1.txt
$list2= gc 2.txt
$list1 | Add-
我创建了下面的脚本,它将值赋给数组$ PerfList并使用Out-Gridview显示它们。一旦选择完成,它应该将选择传递给$ Server,但不会。我得到以下错误: Index operation failed; the array index evaluated to null. At C:\CreateStart.ps1:7 char:21 + foreach { $PerfList[$_