If you need to update several Azure App Services' Configuration to change the Platform setting from 32 bit to 64 bit under Configuration | General settings, this script will save you about six clicks per service and you won't forget to press the SAVE button. Ask me I know. 🙄
Login-AzureRmAccount
Set-AzureRmContext -SubscriptionName "Your Subscription"
$ResourceGroupName = 'RG1', 'RG2', 'RG3'
foreach ($g in $ResourceGroupName)
{
# Set PROD slot to use 64 bit Platform Setting
Get-AzureRmWebApp -ResourceGroupName $g | Select Name | % { Set-AzureRmWebApp -ResourceGroupName $g -Name $_.Name -Use32BitWorkerProcess $false }
# Set staging slot to use 64 bit Platform setting
Get-AzureRmWebApp -ResourceGroupName $g | Select Name | % { Set-AzureRmWebAppSlot -ResourceGroupName $g -Name $_.Name -Slot "staging" -Use32BitWorkerProcess $false }
}
Comments
Post a Comment