Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am looking for Powershell script to retrieve Particular Azure Web App Application settings value based on Key filter.
Thanks
Sathish
Hi, Sathish
Try this:
Replace the ResourceGroup and App Service and KeyFilter vaue variables to suit your environment.
# Import the Azure PowerShell module
Import-Module Az
# Set the name of the Azure Resource Group and App Service
$resourceGroupName = "rg-azure-search-openai-demo-dev"
$appServiceName = "fggggghh"
# Set the key filter for the application configuration setting
$keyFilter = "800"
# Get the application configuration settings for the App Service
$app = Get-AzWebApp -ResourceGroupName $resourceGroupName -Name $appServiceName
$appSettings = $app.SiteConfig.AppSettings
# Find the setting with the specified key filter
$setting = $appSettings | Where-Object { $_.Value -like $keyFilter }
# Output the value of the setting
Write-Output $setting.Value