【发布时间】:2018-08-10 10:37:58
【问题描述】:
我想在名称中有点的 powershell 中设置环境变量。 此行抛出错误:
$env:Test.Env.Var1 = "test111"
The property 'Var1' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:1
+ $env:Test.Env.Var1 = "test111"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
是否可以在不使用[Environment]::SetEnvironmentVariable 方法的情况下设置“Test.Env.Var1”变量?
【问题讨论】:
-
${env.test.value} = 'value' -
“逗号”是指点吗?
标签: powershell