Powershell Set-AzureWebsite:未指定默认订阅。

Powershell Set-AzureWebsite:未指定默认订阅。,powershell,azure,release-management,ms-release-management,Powershell,Azure,Release Management,Ms Release Management,我正在使用VSTS发布管理。在我的发布流程中,我添加了一个任务“Azure PowerShell(在Azure环境中运行PowerShell脚本)”,以运行一个简单脚本,在web应用的web.config中设置一些关键值: Set-AzureWebsite -Name $AzureWebsiteName -AppSettings $appsettings 运行部署时,出现以下错误(与脚本相关): [错误]未指定默认订阅。使用Select AzureSubscription-Default设置默

我正在使用VSTS发布管理。在我的发布流程中,我添加了一个任务“Azure PowerShell(在Azure环境中运行PowerShell脚本)”,以运行一个简单脚本,在web应用的web.config中设置一些关键值:

Set-AzureWebsite -Name $AzureWebsiteName -AppSettings $appsettings
运行部署时,出现以下错误(与脚本相关):

[错误]未指定默认订阅。使用Select AzureSubscription-Default设置默认订阅。 任务配置为使用连接类型“Azure资源管理器”,到目前为止,我知道“Set AzureWeb”应该在经典模式下使用?
是否有其他方法可以使用Azure Ressource管理器模式设置应用程序设置=

Azure网站将更改为ARM中的Azure应用程序服务Web应用程序,因此您可以使用:
set-AzureRmWebApp
替换以下命令:

Set-AzureWebsite $webAppName -AppSettings $appSettingsHash
Set-AzureRmWebApp -AppSettings $appSettingsHash -Name $webAppName -ResourceGroupName $resourceGroupName
使用此命令:

Set-AzureWebsite $webAppName -AppSettings $appSettingsHash
Set-AzureRmWebApp -AppSettings $appSettingsHash -Name $webAppName -ResourceGroupName $resourceGroupName

是的,在更新了建议的更改后,它工作了