I wanted to change the azure webapp settings and i was able to do it through the following powershell code. As you can see there are variables and their values, I want to dynamically call the Variables and their values and loop through it and by using the command only once. Is there a way to achieve it
az webapp config appsettings set -g $resourceGroup -n $webAppName --settings ApplicationInsightsAgent_EXTENSION_VERSION="~2"
az webapp config appsettings set -g $resourceGroup -n $webAppName --settings APPINSIGHTS_PROFILERFEATURE_VERSION="1.0.0"
az webapp config appsettings set -g $resourceGroup -n $webAppName --settings APPINSIGHTS_SNAPSHOTFEATURE_VERSION="1.0.0"
az webapp config appsettings set -g $resourceGroup -n $webAppName --settings XDT_MicrosoftApplicationInsights_BaseExtensions="disabled"
az webapp config appsettings set -g $resourceGroup -n $webAppName --settings XDT_MicrosoftApplicationInsights_Mode="recommended"
az webapp config appsettings set -g $resourceGroup -n $webAppName --settings DiagnosticServices_EXTENSION_VERSION="~3"
az webapp config appsettings set -g $resourceGroup -n $webAppName --settings SnapshotDebugger_EXTENSION_VERSION="disabled"
az webapp config appsettings set -g $resourceGroup -n $webAppName --settings InstrumentationEngine_EXTENSION_VERSION="disabled"