使用 Powershell 在具有服务计划的资源组中创建 Azure 网站(应用程序服务)

Create Azure website (app service) within a resource group with service plan with Powershell

我查看了网络,发现只有一些使用 New-AzureWebsite 的简单示例,例如:

    New-AzureWebsite -Name appName -Location yourLocation 

但是,此命令会在新资源组中创建一个网站并使用新的服务计划。如何使用现有服务计划在现有资源组中创建网站?

您可以使用新的 AzureRM Powershell v.1.0.1 并使用以下命令

New-AzureRMWebApp -ResourceGroupName <RGName> -AppServicePlan <AppServPlan> -Name <SiteName>