Web app configuration using powershell

Sumanth Kannedari 1 Reputation point
2021-10-29T07:33:36.087+00:00

I'm looking for a powershell script which updates the configuration settings without removing the other existing settings in connection strings

Thanks,
Sumanth

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,826 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 25,476 Reputation points Microsoft Employee
    2021-10-29T17:17:52.087+00:00

    You can use Set-AzWebApp cmdlet. For a complete list of PowerShell commands that you can use for App Service, see https://learn.microsoft.com/en-us/powershell/module/az.websites/?view=azps-6.5.0#app_service.

    Your command will look something like Set-AzWebApp -AppSettings <Hashtable> -Name 'ContosoWebApp' -ResourceGroupName 'Default-Web-WestUS' where <Hastable> is @{ <setting-name> = <value>; }. The values inside the hashtable will update if existing or add if missing.

    0 comments No comments