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
抱歉誤會。是的,這意味着,有時它可以正常工作,有時它不能按預期工作。 –