Power Shell脚本,用于在脱机时自动重新配置vNext代理 [英] Power Shell script for automated re-configuration of vNext Agents when it goes offline
问题描述
Hello All,
我正在尝试在vNext Build Agents离线时实现自动重新配置。
是有可能通过Power shell脚本完成它。
如果有,任何人都可以请指导我执行它所需的命令。
任何人都可以指导我这个场景。
您的回复将会受到极大的赞赏。
问候,
Sumana Thakur
Hi Sumana Thakur1,
感谢您在此发帖。
是的,您需要删除首先构建代理,然后再尝试配置代理。你可以参考我的样本:
Param(
[String]
tfsurl =" http:/ / XXXX:8080 / tfs"
)
设置位置D:\ TestAgent123
& .\config.cmd remove --auth Integrated
Set-Location D:\ TestAgent123
& .\config.cmd --unattended --url
tfsurl --auth Integrated --pool Default --agent" AgentName" --runasservice --windowslogonaccount" Account" --windowslogonpassword" password"最好的问候
Limitxiao Ga0
Hello All,
I am trying to implement automated re-configuration of vNext Build Agents when they go offline.
Is there any possibility to get it done via Power shell script.
If yes can anyone please guide me with the required commands to implement it.
Can anyone please guide me regarding this scenario.
Your response will be greatly appreciated.
Regards,
Sumana Thakur
Hi Sumana Thakur1,
Thank you for posting here.
Yes, you need to remove the build agent first, then try to configure the agent again. You could refer to my sample:
Param( [String]
tfsurl = "http://XXXX:8080/tfs" ) Set-Location D:\TestAgent123 & .\config.cmd remove --auth Integrated Set-Location D:\TestAgent123 & .\config.cmd --unattended --url
tfsurl --auth Integrated --pool Default --agent "AgentName" --runasservice --windowslogonaccount "Account" --windowslogonpassword "password"Best Regards
Limitxiao Ga0
这篇关于Power Shell脚本,用于在脱机时自动重新配置vNext代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!