1
我试图从enable_local.ps1
运行xTestPlan_1.ps1
。Powershell:此操作返回,因为超时期限过期
虽然enable_local.ps1
位于本地计算机上,但网络驱动器上有xTestPlan_1.ps1
。我的本地计算机上只有xTestPlan_1.ps1
的快捷方式。
这里是enable_local.ps1
:
$item = "d:\temp\xTestPlan_1.lnk"
WriteInLogFile "$item"
Try
{
& "$item"
}
Catch
{
WriteInLogFile $Error
}
虽然运行此代码,有时,我得到这个错误:
Program "xTestPlan_1.lnk" failed to run: This operation returned because the timeout period expired At D:\Temp\enable_local.ps1.
这个脚本有时正常工作,有时不工作。网络驱动器上确实存在xTestPlan_1.ps1
。
“有时,我得到这个错误”是否意味着它有时按预期工作? – lit
抱歉误会。是的,这意味着,有时它可以正常工作,有时它不能按预期工作。 –