如何使用 Azure Powershell SDK 为 Azure Web 应用程序设置 Java / Tomcat 选项
How to set the Java / Tomcat options for an Azure Web App using Azure Powershell SDK
我可以使用门户为 Azure 网站成功设置 Java 和 Tomcat 版本。但我无法使用 Powershell SDK 执行此操作。
如何使用 Powershell 设置所需的配置?
您可以使用如下脚本:
$javaVersion="1.8"
$javaContainer="TOMCAT"
$javaContainerVersion="8.0.23"
#Configuring jdk and web container
$PropertiesObject = @{javaVersion = $javaVersion;javaContainer = $javaContainer;javaContainerVersion = $javaContainerVersion}
$webappname="shuicli"
$rgname="shuiapp"
Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceGroupName $rgname -ResourceType Microsoft.Web/sites/config -ResourceName $webappname/web -ApiVersion 2015-08-01 -Force
我可以使用门户为 Azure 网站成功设置 Java 和 Tomcat 版本。但我无法使用 Powershell SDK 执行此操作。
如何使用 Powershell 设置所需的配置?
您可以使用如下脚本:
$javaVersion="1.8"
$javaContainer="TOMCAT"
$javaContainerVersion="8.0.23"
#Configuring jdk and web container
$PropertiesObject = @{javaVersion = $javaVersion;javaContainer = $javaContainer;javaContainerVersion = $javaContainerVersion}
$webappname="shuicli"
$rgname="shuiapp"
Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceGroupName $rgname -ResourceType Microsoft.Web/sites/config -ResourceName $webappname/web -ApiVersion 2015-08-01 -Force