Quantcast
Channel: Randy Riness @ SPSCC aggregator
Viewing all articles
Browse latest Browse all 3015

MSDN Blogs: Move Azure Website from one AppServicePlan to another

$
0
0

Here are the steps to move Azure Websites from one AppServicePlan to another.

 

write-host“trying to load azure dlls”

Import-moduleazure

 

write-host“trying to log into Azure”

#Select-AzureSubscription -Default “Microsoft Azure Internal Consumption”

#Add-AzureAccount

#Login-AzureRmAccount

 

 

$AzureSubscription=“<GUID>”

$ResourceGroupName=“InternalConsumptionResourceGroup”

$WebsiteName=“nptesting”

$NewAppServicePlanName=“My2ndAppServucePlan”

# $NewAppServicePlanName = “InternalConsumptionAppServicePlan”

 

$NewServerFarmId=“/subscriptions/”+$AzureSubscription+“/resourceGroups/”+$ResourceGroupName+“/providers/Microsoft.Web/serverfarms/”+$NewAppServicePlanName

 

write-host“trying to get website details”

$websiteResource=Get-AzureRMResource-ResourceType“microsoft.web/sites”-ResourceGroupName$ResourceGroupName-ResourceName$WebsiteName

$websiteResource.Properties.ServerFarmId =$NewServerFarmId

 

write-host“trying to udpate website details”

$websiteResource|Set-AzureRmResource-Force

 

write-host“done changing ASP”

 

Exit

 

 


Viewing all articles
Browse latest Browse all 3015

Trending Articles