powershellazurerelease-managementms-release-management

Set-AzureWebsite: No default subscription has been designated.


I am using VSTS Release Management. In my release flow I add a task 'Azure PowerShell(Run a PowerShell script within an Azure environment)' to run a simple script to set some key vaues in the web.config of a web app:

Set-AzureWebsite -Name $AzureWebsiteName -AppSettings $appsettings

When I run the deployment, I get the following error (related to the script):

[error]No default subscription has been designated. Use Select-AzureSubscription -Default to set the default subscription.

The task is configured to use the connection type "Azure Resource Manager" and so far I understood that 'Set-AzureWebsite' should be used in classic mode? Is there another way to set the AppSettings with the Azure Ressource Manager Mode=


Solution

  • The name Azure websites changes to Azure App Service Web Apps in the ARM, so you can use: Set-AzureRmWebApp