domingo, setembro 03, 2017

How to move Web App to another Service Plan - PowerShell

Create two Service Plan
>New-AzureRmAppServicePlan -Name AppService1 -Location "North Central US" -ResourceGroupName 70533 -Tier Basic

>New-AzureRmAppServicePlan -Name AppService2 -Location "North Central US" -ResourceGroupName 70533 -Tier Basic

Create a new Web App using Service Plan name AppService1:
>New-AzureRmWebApp -Name maykon -Location "North Central US" -AppServicePlan AppService1 -ResourceGroupName 70533

Move to different AppServicePlan
>$props = @{"ServerfarmId" = "AppService2";}
>Set-AzureRmResource -PropertyObject $props -ResourceType Microsoft.Web/sites -ResourceName maykon -ResourceGroupName 70533