aumanjoa
aumanjoa

Reputation: 955

How to set the Java / Tomcat options for an Azure Web App using Azure Powershell SDK

I can successfully set the Java and Tomcat version for Azure web sites using the portal. But I am not able to do this using the Powershell SDK.

How I can set the needed configuration´s with Powershell?

Upvotes: 0

Views: 552

Answers (1)

Shui shengbao
Shui shengbao

Reputation: 19205

You could use script like below:

$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 

Upvotes: 2

Related Questions