2
我尝试从另一个脚本中启动脚本的功能。 我想将回报保存到变量中,但这不起作用。powershell函数返回
script1.ps1:
function test
{
return "hallo"
}
script2.ps1:
./script1.ps1; $p=test
or
$p = ./script1.ps1; test
似乎$p
是空的,但我不知道什么是错。 任何人都可以帮我吗? THX
这不是一个逗号,< - 也就是说;这是一个时期。 < - 像那样;-) – x0n 2010-07-30 14:51:08
thx现在它工作完美 – lepi 2010-07-30 15:01:44
@ x0n,当然。 Thx纠正;) – stej 2010-08-01 17:00:45