开发者

Terminate PowerShell process after script executing

I have a TFS Build where I run PowerShell script. The problem is PowerShell.exe never stops after runnig and do nothing. Script is signed by trusted sertificate and successfully runs on my BuildAgent from PowerShell and writes logs. But it don't to anything from bu开发者_Go百科ild or from cmd.exe. PowerShell.exe just starts and do nothing.

P.S. PS script have Exit commands but it not help.

Thanks, Roman


You can use, Stop-Process -Id $PID from within the script to end the current PowerShell process.


The issue was resolved. Problem was security settings on BuildAgent. When I run script manually from BuildAgent user's account and choose "Run always" build starts working correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜