对象不工作的Powershell$env

对象不工作的Powershell$env,powershell,object,environment-variables,Powershell,Object,Environment Variables,我试过这个: $lst = New-Object System.Collections.ArrayList $lst = ("a1","a2"),("b1","b2") Write-Host $lst[1][0] -ForegroundColor Yellow 工作。那么这个, $env:lst = New-Object System.Collections.ArrayList $env:lst = ("a1","a2"),("b1","b2") Write-Host $env:lst[1][

我试过这个:

$lst = New-Object System.Collections.ArrayList
$lst = ("a1","a2"),("b1","b2")
Write-Host $lst[1][0] -ForegroundColor Yellow
工作。那么这个,

$env:lst = New-Object System.Collections.ArrayList
$env:lst = ("a1","a2"),("b1","b2")
Write-Host $env:lst[1][0] -ForegroundColor Yellow

不起作用(返回“y”而不是“b1”)。发生了什么?如果我使用基本数据类型,
$env:xxx
构造可以工作。

环境变量是strings.ooh。。当然谢谢