gpt4 book ai didi

powershell - TFS-未指定默认订阅。使用Select-AzureSubscription -Default 设置默认订阅

转载 作者:行者123 更新时间:2023-12-02 23:42:21 24 4
gpt4 key购买 nike

我正在尝试在需要设置AD的TFS上运行任务。我设法建立了所有连接,但是由于某种原因,未选择“TFS订阅”。
我不确定我必须登录哪个帐户来设置默认订阅。 -不建议使用默认参数。

我尝试使用的任务加载项可在此处下载:
https://marketplace.visualstudio.com/items?itemName=rbengtsson.appservices-start-stop&showReviewDialog=true

TFS构建错误:
enter image description here

我试图通过Power-shell进行设置:
enter image description here

最佳答案

我已经在我这边测试了 Azure AppServices Stop 任务,发现此任务与 Azure经典连接类型完美配合,但是当使用 Azure资源管理器连接类型时,我得到了与您相同的错误消息。

根据source code of Azure AppServices Stop task on GitHub,此任务实际上使用下面的Azure Power Shell停止服务:

$website = Get-AzureWebsite -Name $WebAppName
Stop-AzureWebsite -Name $WebAppName

似乎 Stop-AzureWebsite仅适用于Azure Classic,因为我们在 Using Azure PowerShell with Azure Resource Manager中找不到它。

总之,如果要使用 Azure AppServices停止任务,则需要选择 Azure经典连接类型:

enter image description here

关于powershell - TFS-未指定默认订阅。使用Select-AzureSubscription -Default <subscriptionName>设置默认订阅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38304862/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com