PowerShell开发,需要定义一个字符串数组并添加数据。网络查询,方法如下:$hwids = @() $id1 = "abc" $id2 = "xyz" $hwids += $id1 $hwids += $id2