How to update multi line string in Azure Web app configuration

lakshmi 671 Reputation points
2023-12-06T07:21:49.3733333+00:00

I want to update multiline in app settings configurations.

Currently the long message is updating as a single large sentence and we wanted to split that message with new lineimage

Whether it's possible to update multi-line in configuration settings

We have tried with \n and \n but it did not work

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,360 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 20,396 Reputation points
    2023-12-07T17:49:36.7433333+00:00

    @lakshmi Thanks for reaching here! You may try using Azure PowerShell task, but just remain newline symbol, the value won’t be in multiple lines, for example:

    $webAppName="XXX"
    $resourceGroupName="XXX"
    $newAppSettings =@{"newSetting01"="newValue01";"newSetting02"="t1\nt2\n123456"}
    Set-AzureRmWebApp -AppSettings $newAppSettings -Name $webAppName -ResourceGroupName $resourceGroupName
    

    You may refer to this article: Apply / Update application settings for Azure App Service using PowerShell

    Let us know.

    0 comments No comments